Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions .github/workflows/containerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,35 @@ permissions:
packages: write

jobs:
pre_postgres:
name: Path match check - postgres
pre_job:
name: Path match check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
postgres: ${{ steps.filter.outputs.postgres }}
nginx: ${{ steps.filter.outputs.nginx }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
# paths-filter needs a checkout to diff push events
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
skip_after_successful_duplicate: false
github_token: ${{ github.token }}
paths: '["docker/Dockerfile.postgres.dev", ".github/workflows/containerbuild.yml"]'
filters: |
postgres:
- 'docker/Dockerfile.postgres.dev'
- '.github/workflows/containerbuild.yml'
nginx:
- 'docker/Dockerfile.nginx.prod'
- 'docker/nginx/*'
- '.github/workflows/containerbuild.yml'

build_and_push_postgres:
name: Postgres - build and push Docker image to GitHub Container Registry
needs: pre_postgres
if: ${{ needs.pre_postgres.outputs.should_skip != 'true' }}
needs: pre_job
if: ${{ github.ref_type == 'tag' || needs.pre_job.outputs.postgres == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
Expand Down Expand Up @@ -71,24 +82,10 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}

pre_nginx:
name: Path match check - nginx
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
skip_after_successful_duplicate: false
github_token: ${{ github.token }}
paths: '["docker/Dockerfile.nginx.prod", "docker/nginx/*", ".github/workflows/containerbuild.yml"]'

build_nginx:
name: nginx - test build of nginx Docker image
needs: pre_nginx
if: ${{ needs.pre_nginx.outputs.should_skip != 'true' }}
needs: pre_job
if: ${{ github.ref_type == 'tag' || needs.pre_job.outputs.nginx == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/deploytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,36 @@ on:

permissions:
contents: read
actions: read

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
deploy: ${{ steps.filter.outputs.deploy }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
# paths-filter needs a checkout to diff push events
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
github_token: ${{ github.token }}
paths: '["**.py", "requirements.txt", ".github/workflows/deploytest.yml", "**.vue", "**.js", "pnpm-lock.yaml", "package.json"]'
filters: |
deploy:
- '**.py'
- 'requirements.txt'
- '.github/workflows/deploytest.yml'
- '**.vue'
- '**.js'
- 'pnpm-lock.yaml'
- 'package.json'
build_assets:
name: Build frontend assets
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.deploy == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down Expand Up @@ -57,7 +68,7 @@ jobs:
make_messages:
name: Build all message files
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.deploy == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down Expand Up @@ -91,7 +102,7 @@ jobs:
browser_smoke_test:
name: Browser smoke test
needs: [pre_job, build_assets]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.deploy == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
services:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/frontendtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,32 @@ on:

permissions:
contents: read
actions: read

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
frontend: ${{ steps.filter.outputs.frontend }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
# paths-filter needs a checkout to diff push events
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
github_token: ${{ github.token }}
paths: '["**.vue", "**.js", "pnpm-lock.yaml"]'
filters: |
frontend:
- '**.vue'
- '**.js'
- 'pnpm-lock.yaml'
test:
name: Frontend tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.frontend == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,28 @@ jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
lint: ${{ steps.filter.outputs.lint }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
# paths-filter needs a checkout to diff push events
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
github_token: ${{ github.token }}
paths_ignore: '["**.po", "**.json"]'
predicate-quantifier: every
# Not '!**.po': picomatch applies that negation at the repo root only.
filters: |
lint:
- '!**/*.po'
- '!**/*.json'
linting:
name: All file linting
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.lint == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,36 @@ on:

permissions:
contents: read
actions: read

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
python: ${{ steps.filter.outputs.python }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
# paths-filter needs a checkout to diff push events
- uses: actions/checkout@v7
- id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
github_token: ${{ github.token }}
paths: '["**.py", "requirements.txt", "requirements-dev.txt", ".github/workflows/pythontest.yml", "webpack.config.js", "webpackDevServerAddress.js"]'
filters: |
python:
- '**.py'
- 'requirements.txt'
- 'requirements-dev.txt'
- '.github/workflows/pythontest.yml'
- 'webpack.config.js'
- 'webpackDevServerAddress.js'

unit_test:
name: Python unit tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
if: ${{ needs.pre_job.outputs.python == 'true' }}
runs-on: ubuntu-latest

services:
Expand Down
Loading