Skip to content

Commit

Permalink
CI: Run workflows on main and release branches, PRs, not tags (OSGeo#…
Browse files Browse the repository at this point in the history
…2348)

This limits when workflows are running using the 'on' specification. Workflows now run on pushed to the main branch and the release branches and on pull requests against these branches. They no longer run on tags and feature/fix branches.

Additionally, CodeQL runs only on main and PRs to main. (Was missing for 8.0 branch already anyway.)
  • Loading branch information
wenzeslaus authored and ninsbl committed Feb 17, 2023
1 parent 6ff67e8 commit d841b31
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 26 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ name: Additional Checks
# (and job) to reduce the number of jobs.

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
additional-checks:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Python Black Formatting
on:
push:
branches:
- main
- releasebranch_*
tags:
- "*.*.*"
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
run-black:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: CentOS

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
build:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: "CodeQL"

on:
push:
branches: [main, releasebranch_7_8]
branches:
- main
pull_request:
branches: [main]
branches:
- main
paths-ignore:
- "**/*.html"
- "**/*.md"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Python Flake8 Code Quality

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
flake8:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: GCC C/C++ standards check

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
build:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: OSGeo4W

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
build:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Python Pylint Code Quality
on:
push:
branches:
- main
- releasebranch_*
tags:
- "*.*.*"
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
pylint:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: pytest

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
pytest:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: General linting

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
super-linter:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Ubuntu
# Build and run tests on Ubuntu

on:
- push
- pull_request
push:
branches:
- main
- releasebranch_*
pull_request:
branches:
- main
- releasebranch_*

jobs:
build-and-test:
Expand Down

0 comments on commit d841b31

Please sign in to comment.