Skip to content

[pre-commit.ci] pre-commit autoupdate #102

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #102

Workflow file for this run

name: CI
on: [push, pull_request]
env:
PROJECT_NAME: 'gnatss'
jobs:
unit_test:
name: ${{ matrix.python-version }}-unit-test
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
experimental: [false]
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Print system platform
shell: python
run: |
import platform
print(platform.machine().lower())
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
- name: Install error reporter
if: ${{ matrix.python-version == '3.10' }}
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Install project
run: pip install ".[test]"
- name: Prepare fortran modules
run: cd tests/fortran && f2py -c -m flib *.f && cd -
- name: Run unit tests
env:
FORCE_COLOR: 3
run: |
set -o pipefail
pytest -vvv --cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term tests/ |& tee unit_test_log${{ matrix.python-version }}.log
- name: Upload unit test log
if: ${{ success() || failure() }}
uses: actions/[email protected]
with:
name: unit_test_log${{ matrix.python-version }}
path: unit_test_log${{ matrix.python-version }}.log
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3