test(loaders): Add test for load_configuration #71
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: 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/[email protected] | |
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 |