Skip to content

Commit

Permalink
use GHA-style if-syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnate committed Dec 22, 2023
1 parent c629892 commit 034a101
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,31 @@ jobs:
echo "Git branch is $(git branch)"
# export MODELICAPATH for subsequent steps
echo "MODELICAPATH=${MODELICAPATH}" >> $GITHUB_ENV
- name: Run pytest (simulation on linux only)
- name: Run pytest (including simulations)
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
if [ '${{ matrix.test_env }}' == 'python' ]; then
poetry run pytest --doctest-modules -v -m 'not dymola' --cov-report term-missing --cov . ./tests
if [ '${{ matrix.os }}' == 'windows-latest' ]; then
poetry run pytest --doctest-modules -v -m 'not simulation and not compilation and not dymola' ./tests
else
poetry run pytest --doctest-modules -v -m 'not dymola' --cov-report term-missing --cov . ./tests
fi
fi
if: matrix.test_env == 'python' && matrix.os == 'ubuntu-latest'
run: poetry run pytest --doctest-modules -v -m 'not dymola' --cov-report term-missing --cov . ./tests
- name: Run Pytest (no compilation or simulation)
if: matrix.test_env == 'python' && matrix.os == 'windows-latest'
run: poetry run pytest --doctest-modules -v -m 'not simulation and not compilation and not dymola' ./tests
- name: Run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
- name: Run mypy
run: |
if [ '${{ matrix.test_env }}' == 'mypy' ]; then
poetry run mypy --install-types --non-interactive --show-error-codes .
fi
if: matrix.test_env =='mypy'
run: poetry run mypy --install-types --non-interactive --show-error-codes .
- name: Build docs
if: matrix.test_env == 'docs'
run: |
if [ '${{ matrix.test_env }}' == 'docs' ]; then
cd docs
poetry run make html
fi
cd docs
poetry run make html
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.test_env == 'python' && matrix.mbl_branch == 'maint_9.1.x' }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.test_env == 'python' }}
run: |
poetry run coveralls
- name: Job Failed
Expand Down

0 comments on commit 034a101

Please sign in to comment.