Merge pull request #78 from DigiEmu/core-2-draft4-self-audit #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Go Tests (Repro Gate) | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Go test | |
| run: | | |
| go test ./... | |
| gate_all_ubuntu: | |
| name: Gate All (ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Build digiemu (CI) | |
| shell: bash | |
| run: | | |
| mkdir -p _release | |
| version="ci-${GITHUB_SHA}" | |
| commit="${GITHUB_SHA}" | |
| date="${GITHUB_RUN_ID}" | |
| CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.Version=${version} -X main.Commit=${commit} -X main.Date=${date}" -o _release/digiemu-ci-ubuntu-amd64 ./cmd/digiemu | |
| - name: Run all gates (verify + bundles + lock) | |
| shell: bash | |
| run: | | |
| ./scripts/gate_all.sh _release/digiemu-ci-ubuntu-amd64 | |
| conformance: | |
| name: Core 2.0 Conformance Checks | |
| runs-on: ubuntu-latest | |
| needs: [gate_all_ubuntu] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Go test | |
| run: | | |
| go test ./... | |
| - name: Run conformance (human-readable) | |
| run: | | |
| set -e | |
| echo "Running experimental conformance (human-readable)" | |
| go run ./cmd/digiemu experimental conformance run testdata/core_2_conformance | tee conformance.out | |
| if ! grep -q "Conformance run summary" conformance.out; then | |
| echo "Missing human-readable summary in conformance output" >&2 | |
| exit 2 | |
| fi | |
| - name: Run conformance (JSON) | |
| run: | | |
| set -e | |
| echo "Running experimental conformance (JSON)" | |
| go run ./cmd/digiemu experimental conformance run testdata/core_2_conformance --json > conformance-report.json | |
| cat conformance-report.json | |
| # Verify expected JSON fields | |
| grep '"status": "PASS"' conformance-report.json | |
| grep '"total": 11' conformance-report.json | |
| grep '"passed": 11' conformance-report.json | |
| grep '"failed": 0' conformance-report.json | |
| docker-conformance: | |
| name: Docker Core 2.0 Conformance Validation | |
| runs-on: ubuntu-latest | |
| needs: [gate_all_ubuntu] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: | | |
| docker build -t digiemu-core . | |
| - name: Run conformance in Docker (human-readable) | |
| run: | | |
| set -e | |
| echo "Running Docker experimental conformance (human-readable)" | |
| docker run --rm digiemu-core experimental conformance run /opt/testdata/core_2_conformance | tee docker-conformance.out | |
| if ! grep -q "Conformance run summary" docker-conformance.out; then | |
| echo "Missing human-readable summary in docker output" >&2 | |
| exit 1 | |
| fi | |
| - name: Run conformance in Docker (JSON) | |
| run: | | |
| set -e | |
| echo "Running Docker experimental conformance (JSON)" | |
| docker run --rm digiemu-core experimental conformance run /opt/testdata/core_2_conformance --json > docker-conformance.json | |
| cat docker-conformance.json | |
| grep '"status": "PASS"' docker-conformance.json | |
| grep '"total": 11' docker-conformance.json | |
| grep '"passed": 11' docker-conformance.json | |
| grep '"failed": 0' docker-conformance.json |