Skip to content

Split out CI into multiple files #971

Split out CI into multiple files

Split out CI into multiple files #971

Workflow file for this run

name: CI
on:
push
concurrency:
# See https://github.com/TWiStErRob/github-workflows/blob/main/snippets/cancel-pr-ci-on-push.yml
group: ${{ github.ref == 'refs/heads/main' && format('ci-main-{0}', github.sha) || format('ci-{0}', github.ref) }}
cancel-in-progress: true
jobs:
build:
name: "🔨 Build & Verifz"
uses: ./.github/workflows/CI-build.yml
pull_request:
name: "Find PR"
uses: ./.github/workflows/CI-pr.yml
# Don't execute on main, it'll never be PR'd.
if: github.ref != 'refs/heads/main' && (success() || failure())
record-base:
name: "📸 Screenshot Tests"
uses: ./.github/workflows/CI-screenshot-record.yml
needs:
- pull_request
# Don't execute on main, as it'll just verify against itself.
if: github.ref != 'refs/heads/main' && needs.pull_request.outputs.found == 'true'
verify-pr:
name: "📸 Screenshot Tests"
uses: ./.github/workflows/CI-screenshot-verify.yml
needs:
# If build fails, there's not much point in running screenshot tests.
- build
# Need to run after recording base branch golden values to compare against them.
- record-base
- pull_request
if: needs.pull_request.outputs.found == 'true'