Skip to content

Commit e864ba0

Browse files
PCSM. Add parallel execution with pyshard (#148)
1 parent 0f38bc6 commit e864ba0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
paths-ignore:
2020
- "tests/**"
2121
- "packaging/**"
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
2227
jobs:
2328
test:
2429
if: github.event.pull_request.draft == false
@@ -28,6 +33,7 @@ jobs:
2833
fail-fast: false
2934
matrix:
3035
psmdb: ["6.0", "7.0", "8.0"]
36+
shard: [0, 1, 2, 3, 4]
3137
env:
3238
PCSM_BRANCH: ${{ github.event_name == 'pull_request' && github.head_ref || github.event.inputs.pcsm_branch || 'main' }}
3339
steps:
@@ -45,9 +51,9 @@ jobs:
4551
docker compose up -d
4652
working-directory: psmdb-testing/pcsm-pytest
4753

48-
- name: Test ${{ matrix.test }} sync on PSMDB ${{ matrix.psmdb }} and PCSM PR/branch ${{ github.head_ref || github.event.inputs.pcsm_branch || env.PCSM_BRANCH }}
54+
- name: Run pytest shard ${{ matrix.shard }} on PSMDB ${{ matrix.psmdb }} and PCSM PR/branch ${{ github.head_ref || github.event.inputs.pcsm_branch || env.PCSM_BRANCH }}
4955
run: |
50-
docker compose run --rm test pytest -s --junitxml=junit.xml
56+
docker compose run --rm test pytest -s -v --junitxml=junit.xml --shard-id=${{ matrix.shard }} --num-shards=5 -m 'not jenkins'
5157
working-directory: psmdb-testing/pcsm-pytest
5258

5359
- name: Publish Test Report

0 commit comments

Comments
 (0)