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

Add .test-durations to artifacts instead of creating pull requests #1517

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ jobs:
with:
python-version: ${{ steps.setup-python.outputs.python-version }}

- name: "Download test durations artefact"
uses: actions/download-artifact@v4
with:
name: test_durations

- name: "Run pytest with coverage"
run: poetry run coverage run --branch -m pytest --disable-warnings --splits 12 --splitting-algorithm least_duration --group ${{ matrix.group }}
env:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/update_test_durations.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "Create a new PR to update test durations"
name: "Update test durations to project artefacts"

on:
workflow_dispatch:
schedule:
# Run on the first day of every month
- cron: "0 0 1 * *"
# At midnight on Sunday
- cron: "0 0 * * 0"

env:
PYTHON_VERSION: 3.13
Expand Down Expand Up @@ -62,12 +62,12 @@ jobs:
env:
DJANGO_SETTINGS_ENVIRONMENT: AutomatedTests

- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v7
- name: "Upload test durations artefact"
uses: actions/upload-artifact@v4
with:
title: "[github-actions] Update test durations"
body: "Update test durations file"
commit-message: "Update test durations"
branch: update-test-durations
delete-branch: true
labels: github_actions
name: test_durations
path: .test_durations
if-no-files-found: error
retention-days: 90
include-hidden-files: true
overwrite: true
Loading
Loading