mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 08:23:12 +00:00
Build and test, architecture, and dependency-review are the required checks on main. A merge queue only counts checks that ran on the merge_group event, so each workflow now triggers on it. The architecture gate reads the merge group's own base and head because github.event.before is empty there. The dependency-review action cannot diff a merge group, so that event reports the same check name from a pass-through job; the real review already gated the pull request before it could be queued.
39 lines
973 B
YAML
39 lines
973 B
YAML
name: Backend CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main, dev, staging]
|
|
# The merge queue builds main plus the queued pull requests on a temporary
|
|
# branch and only counts checks that ran on the merge_group event.
|
|
merge_group:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
concurrency:
|
|
group: backend-ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v6
|
|
with:
|
|
dotnet-version: "8.0.x"
|
|
|
|
- name: Restore
|
|
run: dotnet restore SeaHavenIndustries.sln
|
|
|
|
- name: Build
|
|
run: dotnet build SeaHavenIndustries.sln --no-restore --configuration Release
|
|
|
|
- name: Test
|
|
run: dotnet test SeaHavenIndustries.sln --no-build --configuration Release
|