Skip to content

Commit e278f63

Browse files
committed
ci: consolidated all go ci tasks into a single workflow
1 parent c4e7d82 commit e278f63

1 file changed

Lines changed: 8 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,63 +33,41 @@ jobs:
3333
outputs:
3434
tools: ${{ steps.mise.outputs.tools }}
3535
steps:
36-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
36+
- &checkout
37+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
3738
with:
3839
persist-credentials: false
3940
- uses: yshrsmz/action-mise-values@92f49c5a07ebc7ffa957be5efa6a2c673578bbb0
4041
id: mise
4142

42-
lint:
43+
goci:
4344
needs: versions
4445
runs-on: ubuntu-latest
4546
permissions:
4647
contents: read
4748
steps:
48-
- &checkout
49-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
50-
with:
51-
persist-credentials: false
49+
- *checkout
5250
- &setup-go
5351
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
5452
with:
5553
go-version: ${{ fromJson(needs.versions.outputs.tools).go }}
56-
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20
57-
with:
58-
version: v${{ fromJson(needs.versions.outputs.tools).golangci-lint }}
59-
60-
test:
61-
needs: versions
62-
environment: test
63-
runs-on: ubuntu-latest
64-
permissions:
65-
contents: read
66-
steps:
67-
- *checkout
68-
- *setup-go
6954
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151
55+
- name: Lint
56+
run: mise lint
7057
- name: Test
7158
run: mise test
7259
- name: Coverage
73-
run: mise run covercheck
60+
run: mise covercheck
7461
- name: Upload coverage reports to Codecov
7562
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2
7663
with:
7764
token: ${{ secrets.CODECOV_TOKEN }}
78-
79-
build:
80-
needs: [versions, lint, test]
81-
runs-on: ubuntu-latest
82-
permissions:
83-
contents: read
84-
steps:
85-
- *checkout
86-
- *setup-go
8765
- name: Build
8866
run: go build .
8967

9068
release:
9169
runs-on: ubuntu-latest
92-
needs: [hk, versions, build]
70+
needs: [hk, versions, goci]
9371
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
9472
permissions:
9573
contents: write

0 commit comments

Comments
 (0)