Skip to content

Commit

Permalink
Merge remote-tracking branch 'ci/main' into extend-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Feb 8, 2024
2 parents 954da26 + a537160 commit 3f560e2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: check for update
uses: pdm-project/update-deps-action@d76795be3e5bc1d841dd3f45d1ff0d9c2d905725
uses: pdm-project/update-deps-action@53ff698bc3f48536910f1c6587b17e33a0d25e51
with:
commit-message: "build: update pdm.lock"
update-strategy: reuse
68 changes: 22 additions & 46 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- "3.12"

runs-on: ${{ matrix.os }}-latest
env:
OS: ${{ matrix.os }}-latest
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4

Expand All @@ -55,13 +58,19 @@ jobs:
run: make install-dev

- name: Run tests for coverage
run: make test-w-coverage
run: make test-w-coverage cov_report=xml

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: .coverage-${{ matrix.os }}-${{ matrix.python-version }}
path: .coverage
token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./coverage
env_vars: OS,PYTHON
fail_ci_if_error: true
# files: ./coverage/coverage.xml
# flags: unittests
# name: codecov-umbrella
verbose: true

doctests:
name: "${{ matrix.os }} / 3.9 / doctest"
Expand All @@ -72,6 +81,8 @@ jobs:
os: [ubuntu]

runs-on: ${{ matrix.os }}-latest
env:
OS: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -95,55 +106,22 @@ jobs:
# Run tests and upload coverage
#----------------------------------------------
- name: make doc-tests
run: make doc-tests

- name: Upload coverage files
uses: actions/upload-artifact@v4
with:
name: .coverage-${{ matrix.os }}-doctest-${{ env.MINIMUM_PYTHON_VERSION }}
path: .coverage

upload-coverage:
name: ubuntu / 3.9 / upload-coverage
needs:
- coverage
- doctests
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ env.MINIMUM_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}

- name: Install dependencies
run: pip install coverage

- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: .coverage-*

- name: convert coverage to xml
run: |
ls -aR
coverage combine .coverage*/.coverage
coverage xml -i
ls -a
run: make doc-tests cov_report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# directory: ./coverage
# env_vars: OS,PYTHON
fail_ci_if_error: false
env_vars: OS,PYTHON,TESTTYPE
fail_ci_if_error: true
# files: ./coverage/coverage.xml
# flags: unittests
# name: codecov-umbrella
verbose: true
env:
PYTHON: ${{ env.MINIMUM_PYTHON_VERSION }}
TESTTYPE: doctest

minimal:
# This action chooses the oldest version of the dependencies permitted by Cargo.toml to ensure
Expand Down Expand Up @@ -176,15 +154,13 @@ jobs:
- coverage
- doctests
- minimal
- upload-coverage
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-failures: upload-coverage

build:
name: ubuntu / 3.9 / build package
Expand Down

0 comments on commit 3f560e2

Please sign in to comment.