103 lines
3.6 KiB
YAML
103 lines
3.6 KiB
YAML
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:
|
|
# The package fails to install on versions < 6.6 due to some SSL error, that seems due to some incompatibility between system (SSL) updates and raco, and is unrelated to this package.
|
|
#- 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
|
|
cov: true
|
|
env:
|
|
# RACKET_DIR is an argument to install-racket.sh
|
|
RACKET_VERSION: "${{ matrix.racket }}"
|
|
RACKET_CS: "${{ matrix.racket_cs }}"
|
|
COV: "${{ matrix.cov }}"
|
|
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
|
|
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"
|
|
echo -n "$CODECOV_TOKEN" | wc -c
|
|
- 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 https://github.com/jsmaniac/codecov-racket.git#github-ci; 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 "$GITHUB_WORKSPACE")"; fi
|
|
- name: Check documentation coverage
|
|
run: if $COV; then raco doc-coverage "$(basename "$GITHUB_WORKSPACE")"; 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.
|
|
build-status-check:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: build-status-check
|
|
run: echo "This job depends on a successful build"
|