Skip to content

Commit

Permalink
Cache test_report shelves in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Aug 31, 2022
1 parent b7e184a commit 4d4060c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/test-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
PYTHON_VERSION: 3.9
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2

Expand All @@ -24,20 +28,27 @@ jobs:
miniforge-version: latest
condarc-file: continuous_integration/condarc
use-mamba: true
python-version: 3.9
python-version: ${{ env.PYTHON_VERSION }}
environment-file: continuous_integration/scripts/test-report-environment.yml
activate-environment: dask-distributed

- name: Show conda options
shell: bash -l {0}
run: conda config --show

- name: mamba list
shell: bash -l {0}
run: mamba list

- uses: actions/cache@v3
id: cache
with:
# Suffix is depending on the backend / OS. Let's be agnostic here
# See https://docs.python.org/3/library/shelve.html#shelve.open
path: |
test_report*
!test_report.html
key: ${{ env.PYTHON_VERSION }}-${{ hashFiles('continuous_integration/scripts/test_report*') }}

- name: Generate report
shell: bash -l {0}
run: |
python continuous_integration/scripts/test_report.py --max-days 90 --max-runs 50 --nfails 1 -o test_report.html
python continuous_integration/scripts/test_report.py --max-days 7 --max-runs 50 --nfails 2 -o test_short_report.html --title "Test Short Report"
Expand Down

0 comments on commit 4d4060c

Please sign in to comment.