Skip to content

Commit

Permalink
Merge pull request #729 from UW-GAC/maint/fix-ci-for-upload-artifact-…
Browse files Browse the repository at this point in the history
…breaking-change

Fix CI for upload artifact breaking change
  • Loading branch information
amstilp authored Sep 3, 2024
2 parents 2feaa88 + 18a236f commit 7935be7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
steps:

- name: Checkout Code Repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -93,27 +93,28 @@ jobs:
- name: Run tests
run: |
pytest --cov=primed -n auto
mv .coverage .coverage-${{ strategy.job-index }}
mv .coverage coverage-${{ strategy.job-index }}
- name: List files for debugging purposes
run: ls -lhta

- name: Upload coverage data
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.0
with:
name: coverage-data-${{ strategy.job-index }}
path: .coverage-${{ strategy.job-index }}
path: coverage-${{ strategy.job-index }}
if-no-files-found: error

coverage:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.2.0
with:
python-version: '3.10'

Expand All @@ -123,13 +124,14 @@ jobs:
pip install --upgrade coverage "django<4" django-coverage-plugin
- name: Download coverage data
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
path: ./artifacts/

- name: Merge coverage files
run: |
python -m coverage combine ./artifacts/coverage-data*/.coverage-*
ls -la ./artifacts/coverage-data*
python -m coverage combine ./artifacts/coverage-data*/coverage-*
python -m coverage xml
ls -la .coverage*
Expand All @@ -138,6 +140,6 @@ jobs:
python -m coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
- uses: gitleaks/gitleaks-action@v2.3.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts.
4 changes: 2 additions & 2 deletions .github/workflows/pip-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
uses: actions/checkout@v4.1.7
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"

Expand Down

0 comments on commit 7935be7

Please sign in to comment.