Introduce GitHub Action. #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
# the OS must be GNU/Linux to be able to use the docker-coq-action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: coq-community/docker-coq-action@v1 | |
with: | |
opam_file: 'coq-platform-docs.opam' | |
before_script: | | |
startGroup "Workaround permission issue" | |
sudo chown -R coq:coq . # <-- | |
endGroup | |
startGroup "Install npm" | |
# installs nvm (Node Version Manager) | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
# download and install Node.js (you may need to restart the terminal) | |
nvm install 20 | |
# verifies the right Node.js version is in the environment | |
node -v # should print `v20.14.0` | |
# verifies the right NPM version is in the environment | |
npm -v # should print `10.7.0` | |
endGroup | |
script: | | |
startGroup "Build" | |
cd src | |
make node_modules | |
make | |
endGroup | |
uninstall: "" | |
# See also: | |
# https://github.com/coq-community/docker-coq-action#readme | |
# https://github.com/erikmd/docker-coq-github-action-demo |