ci: ♻️ Make tests, linting and checks pass before build is run

This commit is contained in:
Jesse Wierzbinski 2024-12-31 17:35:27 +01:00
parent deada6cbd9
commit 9d88fdbe53
No known key found for this signature in database
4 changed files with 15 additions and 16 deletions

View file

@ -1,11 +1,7 @@
name: Check Types name: Check Types
on: on:
push: workflow_call:
branches: ["*"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs: jobs:
tests: tests:

View file

@ -2,14 +2,25 @@ name: Build Docker Images
on: on:
push: push:
branches: ["main"] branches: ["*"]
# Publish semver tags as releases. # Publish semver tags as releases.
tags: ["v*.*.*"] tags: ["v*.*.*"]
pull_request: pull_request:
branches: ["main"] branches: ["main"]
jobs: jobs:
lint:
uses: ./.github/workflows/lint.yml
check:
uses: ./.github/workflows/check.yml
tests:
uses: ./.github/workflows/tests.yml
build: build:
if: ${{ success() }}
needs: [lint, check, tests]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read

View file

@ -1,11 +1,7 @@
name: Lint & Format name: Lint & Format
on: on:
push: workflow_call:
branches: ["*"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs: jobs:
tests: tests:

View file

@ -1,11 +1,7 @@
name: Tests name: Tests
on: on:
push: workflow_call:
branches: ["*"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs: jobs:
tests: tests: