Skip to content

Commit cebba92

Browse files
authored
Improve GitHub workflow (#1031)
- concurrency cancels builds in progress e.g. on pull requests - matrix jobs no longer fail fast, allowing to see failure reasons for all matrix jobs - coveralls no longer runs on forks, this would fail anyways
1 parent 3fb9dd9 commit cebba92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ on:
44
push:
55
pull_request:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
9+
cancel-in-progress: true
10+
711
jobs:
812
test:
913
runs-on: ubuntu-20.04
1014
strategy:
15+
fail-fast: false
1116
matrix:
1217
include:
1318
- db: "mariadb:10.2"
@@ -82,13 +87,15 @@ jobs:
8287
pytest -v --cov --cov-config .coveragerc tests/test_auth.py;
8388
8489
- name: Report coverage
90+
if: github.repository == 'PyMySQL/PyMySQL'
8591
run: coveralls --service=github
8692
env:
8793
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8894
COVERALLS_FLAG_NAME: ${{ matrix.py }}-${{ matrix.db }}
8995
COVERALLS_PARALLEL: true
9096

9197
coveralls:
98+
if: github.repository == 'PyMySQL/PyMySQL'
9299
name: Finish coveralls
93100
runs-on: ubuntu-20.04
94101
needs: test

0 commit comments

Comments
 (0)