diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1340d09 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,95 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +on: + push: + branches: [ main, dev ] + pull_request: + branches: [ main ] + + # Allows to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + racket: ['6.9', '6.10', '6.10.1', '6.11', '6.12', '7.0', '7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '8.0'] + cov: [true] + racket_cs: [0] + include: + - racket: '6.0' + racket_cs: 0 + cov: false + - racket: '6.1' + racket_cs: 0 + cov: false + - racket: '6.1.1' + racket_cs: 0 + cov: false + - racket: '6.2' + racket_cs: 0 + cov: false + - racket: '6.3' + racket_cs: 0 + cov: false + - racket: '6.4' + racket_cs: 0 + cov: false + - racket: '6.5' + racket_cs: 0 + cov: false + - racket: '6.6' + racket_cs: 0 + cov: false + - racket: '6.7' + racket_cs: 0 + cov: false + - racket: '6.8' + racket_cs: 0 + cov: false + - racket: '8.0' + racket_cs: 1 + env: + # RACKET_DIR is an argument to install-racket.sh + RACKET_VERSION: "${{ matrix.racket }}" + RACKET_CS: "${{ matrix.racket_cs }}" + COV: "${{ matrix.cov }}" + steps: + - uses: actions/checkout@v2 + - name: Add to $PATH + run: | + printf %s\\n "$HOME/.racket/bin" >> "$GITHUB_PATH" + - name: Print environment variables + run: | + echo "matrix.racket ${{ matrix.racket }}" + echo "matrix.racket_cs ${{ matrix.racket_cs }}" + echo "matrix.cov ${{ matrix.cov }}" + echo HOME="$HOME" + echo PATH="$PATH" + echo RACKET_VERSION="$RACKET_VERSION" + echo RACKET_CS="$RACKET_CS" + echo COV="$COV" + echo GITHUB_WORSPACE="$GITHUB_WORKSPACE" + - name: Install Racket + run: | + export RACKET_DIR="$HOME/.racket" + curl -L https://raw.githubusercontent.com/greghendershott/travis-racket/master/install-racket.sh | bash + - name: Install cover + run: if $COV; then raco pkg install --deps search-auto doc-coverage cover cover-codecov; fi # or cover-coveralls + - name: Install the Racket package + run: raco pkg install --deps search-auto -j 2 + - name: Test the Racket package + run: raco test -r -p "$(basename "$GITHUB_WORKSPACE")" + - name: Check the dependencies of the Racket package + run: if $COV; then raco setup --check-pkg-deps --no-zo --no-launcher --no-install --no-post-install --no-docs --pkgs "$(basename "$TRAVIS_BUILD_DIR")"; fi + - name: Check documentation coverage + run: if $COV; then raco doc-coverage "$(basename "$TRAVIS_BUILD_DIR")"; fi + - name: Check code coverage + run: if $COV; then raco cover -s main -s test -s doc -f codecov -f html -d ~/coverage . || true; fi + # TODO: add an option to cover to run the "outer" module too, not just the submodules. + # TODO: deploy the coverage info. +