Launch CI on push to main and pull requests (#21) #89
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: docker://firedrakeproject/firedrake-vanilla:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Python info | |
shell: bash | |
run: | | |
source /home/firedrake/firedrake/bin/activate | |
which python | |
python -c "import sys; print('\n'.join(sys.path))" | |
python -c "from firedrake import *" | |
- name: Install dependencies | |
shell: bash | |
run: | | |
source /home/firedrake/firedrake/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
python -m pip install pytest-cov | |
python -m pip install pytest-check | |
python -m pip install coveralls | |
- name: Install firedrake-ts | |
shell: bash | |
run: | | |
source /home/firedrake/firedrake/bin/activate | |
python -m pip install -e . | |
- name: Test with pytest | |
shell: bash | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: | | |
source /home/firedrake/firedrake/bin/activate | |
python -c "import sys; print('\n'.join(sys.path))" | |
python -m pytest --cov=firedrake_ts --cov-config=tests/.coveragerc tests/ | |
coveralls | |
bash <(curl -s https://codecov.io/bash) |