feat: zombie 2.0 — Session/Action architecture + service template protocol #73
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 | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - run: go vet ./... | |
| test: | |
| name: test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - run: go mod download | |
| - name: Unit & E2E tests | |
| run: go test -count=1 -timeout 300s ./... | |
| build: | |
| name: build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - run: go build ./... | |
| - name: Build with emptytemplates tag | |
| run: go build -tags emptytemplates ./... | |
| templates: | |
| name: template validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Validate service templates | |
| run: go test -count=1 -run TestLoadAllTemplates ./service/... | |
| - name: Validate loot templates | |
| run: go test -count=1 -run TestLoadLootTemplates ./service/... | |
| - name: Verify embedded data is current | |
| run: | | |
| go run templates/templates_gen.go -t templates -o /tmp/templates_check.go -need zombie -embed | |
| diff -q pkg/templates.go /tmp/templates_check.go || { | |
| echo "::error::pkg/templates.go is out of date — run 'go generate' and commit" | |
| exit 1 | |
| } |