Skip to content

Commit 6f9db16

Browse files
authored
MAINT: avoid tests to run if linting fails (#459)
1 parent f0f4e04 commit 6f9db16

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

.github/workflows/docker-gdal.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
name: Docker GDAL Test
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
workflow_dispatch:
3+
on: [workflow_call] # will be called from lint workflow.
94

105
# cancel running jobs on new commit to PR
116
concurrency:
12-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
group: Tests-docker-gdal-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
138
cancel-in-progress: true
149

1510
jobs:
16-
TestLinux:
11+
Tests-docker-gdal:
1712
name: GDAL ${{ matrix.container }}
1813
runs-on: ubuntu-latest
1914
strategy:

.github/workflows/lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ jobs:
1717
with:
1818
python-version: "3.11"
1919
- uses: pre-commit/[email protected]
20+
21+
Call-tests-conda:
22+
needs: [Linting] # require linting to pass before tests run
23+
uses: ./.github/workflows/tests-conda.yml
24+
25+
Call-tests-docker-gdal:
26+
needs: [Linting] # require linting to pass before tests run
27+
uses: ./.github/workflows/docker-gdal.yml
28+

.github/workflows/tests-conda.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
name: Conda Tests
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
workflow_dispatch:
3+
on: [workflow_call] # will be called from lint workflow.
94

105
# cancel running jobs on new commit to PR
116
concurrency:
12-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
group: Tests-conda-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
138
cancel-in-progress: true
149

1510
jobs:
16-
test:
11+
Tests-conda:
1712
name: ${{ matrix.os }}, python ${{ matrix.python }}, ${{ matrix.env }}
1813
runs-on: ${{ matrix.os }}
1914
defaults:

0 commit comments

Comments
 (0)