Skip to content

Commit

Permalink
fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
digitronik committed Jan 15, 2025
1 parent 27cde0f commit 25a13e6
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
name: Pre-Commit Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: 'x64'
Expand All @@ -27,51 +27,51 @@ jobs:
- name: Analysis (git diff)
if: failure()
run: git diff
# test:
# name: UnitTests-Python-${{ matrix.python-version }}
# needs: [ pre-commit ]
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.8", "3.9", "3.10"]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v3
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# pip install -U pip wheel
# pip install .[test]
# - name: Test with pytest
# run: |
# pytest -v -n 5 --no-cov-on-fail --cov=sitreps_client --cov-append
# mv .coverage ${{ strategy.job-index }}_coverage
# - name: Upload coverage artifact
# uses: "actions/upload-artifact@v2"
# with:
# name: ${{ strategy.job-index }}_coverage
# path: ${{ strategy.job-index }}_coverage
#
# submit_coverage:
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/setup-python@v3
# with:
# python-version: "3.8"
# - uses: actions/checkout@v3
# - name: Install coverage
# run: pip install coverage
# - name: Download coverage artifacts
# uses: actions/download-artifact@v2
# with:
# path: /tmp/coverage
# - name: Combine coverage data files
# run: |
# coverage combine -a $(find /tmp/coverage -type f)
# coverage xml -o /tmp/coverage.xml
# - name: Publish coverage
# uses: codecov/codecov-action@v1.5.2
# with:
# files: /tmp/coverage.xml
test:
name: UnitTests-Python-${{ matrix.python-version }}
needs: [ pre-commit ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip wheel
pip install .[test]
- name: Test with pytest
run: |
pytest -v --no-cov-on-fail --cov=sitreps_client --cov-append
mv .coverage ${{ strategy.job-index }}_coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: ${{ strategy.job-index }}_coverage
path: ${{ strategy.job-index }}_coverage

submit_coverage:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/checkout@v4
- name: Install coverage
run: pip install coverage
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
path: /tmp/coverage
- name: Combine coverage data files
run: |
coverage combine -a $(find /tmp/coverage -type f)
coverage xml -o /tmp/coverage.xml
- name: Publish coverage
uses: codecov/codecov-action@v1.5.2
with:
files: /tmp/coverage.xml

0 comments on commit 25a13e6

Please sign in to comment.