ci(github): merge build step into test job

This commit is contained in:
Valentin Maerten
2025-12-07 22:46:05 +01:00
parent 2cb7eaa3cc
commit 17576081b3

View File

@@ -13,25 +13,6 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build:
name: 🔨 Build (${{ matrix.go-version }})
strategy:
fail-fast: false
matrix:
go-version: [1.24.x, 1.25.x]
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v6
- name: ⬇️ Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: 🔨 Build
run: go build -v ./cmd/task
test: test:
name: 🧪 Test (${{ matrix.go-version }}, ${{ matrix.platform }}) name: 🧪 Test (${{ matrix.go-version }}, ${{ matrix.platform }})
strategy: strategy:
@@ -49,11 +30,11 @@ jobs:
with: with:
go-version: ${{ matrix.go-version }} go-version: ${{ matrix.go-version }}
- name: ⬇️ Setup Task - name: 🔨 Build
uses: go-task/setup-task@v1 run: go build -v -o ./bin/task ./cmd/task
- name: 🧪 Test - name: 🧪 Test
run: task test run: ./bin/task test
lint: lint:
name: 🔍 Lint (${{ matrix.go-version }}) name: 🔍 Lint (${{ matrix.go-version }})
@@ -97,13 +78,12 @@ jobs:
ci-status: ci-status:
name: ✅ CI name: ✅ CI
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build, test, lint, lint-jsonschema] needs: [test, lint, lint-jsonschema]
if: always() if: always()
steps: steps:
- name: ✅ Check CI status - name: ✅ Check CI status
run: | run: |
if [[ "${{ needs.build.result }}" != "success" ]] || \ if [[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.lint.result }}" != "success" ]] || \ [[ "${{ needs.lint.result }}" != "success" ]] || \
[[ "${{ needs.lint-jsonschema.result }}" != "success" ]]; then [[ "${{ needs.lint-jsonschema.result }}" != "success" ]]; then
echo "CI failed" echo "CI failed"