Skip to content

Commit

Permalink
Add .test-durations to artefacts instead of creating pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
matti-lamppu committed Feb 3, 2025
1 parent e527894 commit 21c63b4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2,552 deletions.
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

0 comments on commit 21c63b4

Please sign in to comment.