commit 3f0cb6d2f9206a0b1f1d25df227938451172b63c
parent 2cb6125abeca25fbc8dd971ddf0c440b2f986a9c
Author: Suzanne Soy <ligo@suzanne.soy>
Date: Tue, 6 Jul 2021 03:51:25 +0100
Added GitHub Actions CI script
Diffstat:
1 file changed, 72 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
@@ -0,0 +1,72 @@
+# 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']
+ racket_cs: [0]
+ cover: [true]
+ exclude:
+ - racket: '6.8'
+ cover: true
+ include:
+ - racket: '8.0'
+ racket_cs: 1
+ cover: true
+ - racket: '6.8'
+ racket_cs: 1
+ cover: false
+ env:
+ # RACKET_DIR is an argument to install-racket.sh
+ RACKET_VERSION: "${{ matrix.racket }}"
+ RACKET_CS: "${{ matrix.racket_cs }}"
+ COVER: "${{ matrix.cover }}"
+ 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 HOME="$HOME"
+ echo PATH="$PATH"
+ echo RACKET_VERSION="$RACKET_VERSION"
+ echo RACKET_CS="$RACKET_CS"
+ 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 the Racket package
+ run: raco pkg install --deps search-auto -j 2
+ - name: Test the Racket package
+ run: raco test -p "$(basename "$GITHUB_WORKSPACE")"
+ - name: (Re?)Build the Racket package
+ run: raco setup --check-pkg-deps --no-zo --no-launcher --no-install --no-post-install --no-docs --pkgs "$(basename "$GITHUB_WORKSPACE")"
+ - name: Documentation coverage
+ run: |
+ if $COVER; then raco pkg install --deps search-auto doc-coverage; fi
+ if $COVER; then raco doc-coverage phc-graph; fi
+ - name: Code coverage
+ run: |
+ if $COVER; then raco pkg install --deps search-auto cover cover-coveralls; fi
+ if $COVER; then raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage .; fi
+ - name: Deploy
+ run: if test "x${DEPLOY:-}" = "xtrue"; then sh ./auto-push-gh-pages.sh; fi
+