test: workflow with shards

This commit is contained in:
Roman 2025-04-28 12:35:48 +08:00
parent ad295831d3
commit 53266bbaf1
No known key found for this signature in database
GPG Key ID: 583BDF43C238B83E
3 changed files with 11 additions and 4 deletions

View File

@ -1,10 +1,12 @@
name: Nomos E2E Tests Daily name: Test Nomos E2E Tests Daily
on: on:
schedule: schedule:
- cron: '0 4 * * *' - cron: '0 4 * * *'
workflow_dispatch: workflow_dispatch:
push:
branches:
- chore-sharding-github-workflows
jobs: jobs:
test-common: test-common:
uses: ./.github/workflows/test_common.yml uses: ./.github/workflows/test_common.yml

View File

@ -9,6 +9,10 @@ env:
jobs: jobs:
tests: tests:
name: tests name: tests
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 120 timeout-minutes: 120
steps: steps:
@ -29,4 +33,4 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
pytest pytest --shard-id=${{ matrix.shard }} --num-shards=10

View File

@ -41,4 +41,5 @@ typing_extensions==4.9.0
urllib3==2.2.2 urllib3==2.2.2
virtualenv==20.25.0 virtualenv==20.25.0
Jinja2~=3.1.5 Jinja2~=3.1.5
psutil~=7.0.0 psutil~=7.0.0
pytest-shard==0.1.2