PureYAML/.github/workflows/gates.yml
Mihaela M ea31bb5864 chore(ci): split CI into per-workflow files with truthful badges
Rule 8.1 forbids one multi-job workflow fronted by several cosmetically
labeled badges that all resolve to the same whole-workflow status. Split
ci.yml into one workflow per concern (gates, macOS, Linux, Windows,
WASM, corpus), each with a unique name, and point each README badge at
its own workflow through the native per-workflow badge. The WASM
workflow notes in a header that it is a build gate, not a test gate
(Rule 8.3). Add a static MIT license badge linking to LICENSE
(Rule 8.2). Step contents are unchanged from the previous jobs.
2026-06-26 05:48:11 +02:00

36 lines
910 B
YAML

name: Gates
# Repository style/structure gates plus format and lint. One concern, one badge.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
issues: read
jobs:
gates:
name: Gates
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install format and lint tools
run: brew install swiftformat swiftlint
- name: Repository gates
env:
GH_TOKEN: ${{ github.token }}
run: |
bash scripts/check-style.sh
bash scripts/check-namespacing.sh
bash scripts/check-forbidden-patterns.sh
git fetch origin main --depth=1 || true
BASE_REF=origin/main bash scripts/check-changelog-touched.sh
- name: Format and lint
run: |
swiftformat . --config .swiftformat --lint
swiftlint --config .swiftlint.yml --strict