Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache test_report shelves in CI #6937

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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