From 1e4f2ef81725ae8787f141f1d6401c4024f89887 Mon Sep 17 00:00:00 2001 From: gianlucaguarini Date: Fri, 18 Aug 2023 23:27:40 +0200 Subject: [PATCH] updated: switch to github actions --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- README.md | 6 +++--- fortytwo.cabal | 4 ++-- 4 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..39bfc04 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: ci +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: haskell/actions/setup@v1 + with: + ghc-version: "9.4.5" + enable-stack: true + stack-version: "latest" + - uses: actions/cache@v2 + name: Cache ~/.stack ~/.cabal + with: + path: | + ~/.stack + ~/.cabal + key: ${{ runner.os }}-store-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('fortytwo.cabal') }} + - name: Build + run: make build + - name: Test + run: make test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c18038b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: c -sudo: false - -notifications: - email: false - -# Caching so the next build will be fast too. -cache: - directories: - - $HOME/.stack - -before_install: -# Download and unpack the stack executable - - mkdir -p ~/.local/bin - - export PATH=$HOME/.local/bin:$PATH - - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' - -# This line does all of the work: installs GHC if necessary, build the library, -# executables, and test suites, and runs the test suites. --no-terminal works -# around some quirks in Travis's terminal implementation. -script: stack --no-terminal --install-ghc test --haddock - -# Caching so the next build will be fast too. -cache: - directories: - - $HOME/.stack - - $HOME/.cabal diff --git a/README.md b/README.md index f6fd374..efb0c9c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ _Interactive terminal prompt_ -[![Build Status][travis-image]][travis-url] +[![Build Status][ci-image]][ci-url] [![MIT License][license-image]][license-url] ![fortytwo](https://github.com/GianlucaGuarini/fortytwo/raw/develop/fortytwo.jpg) @@ -117,8 +117,8 @@ main = multiselectWithDefault This script is heavily inspired by [survey (golang)](https://github.com/AlecAivazis/survey) -[travis-image]:https://img.shields.io/travis/GianlucaGuarini/fortytwo.svg?style=flat-square -[travis-url]:https://travis-ci.org/GianlucaGuarini/fortytwo +[ci-image]: https://img.shields.io/github/actions/workflow/status/GianlucaGuarini/fortytwo/ci.yml?style=flat-square +[ci-url]: https://github.com/GianlucaGuarini/fortytwo/actions [license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square [license-url]:LICENSE diff --git a/fortytwo.cabal b/fortytwo.cabal index 6cf9922..3b86022 100644 --- a/fortytwo.cabal +++ b/fortytwo.cabal @@ -4,10 +4,10 @@ synopsis: Interactive terminal prompt description: List of Prompt helpers to pimp the UIs of your haskell programs homepage: https://github.com/gianlucaguarini/fortytwo#readme license: MIT -license-file: LICENSE +license-file: LICENSE author: Gianluca Guarini maintainer: gianluca.guarini@gmail.com -copyright: Gianlua Guarini +copyright: Gianluca Guarini category: Prompt build-type: Simple extra-source-files: README.md