Skip to content

Commit 12f0244

Browse files
authored
ci: split go and devenv tests (#17)
* ci: split go and devenv tests * ci: add goreleaser test steps
1 parent 5160935 commit 12f0244

2 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/codeChecks.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
paths:
66
- ".github/workflows/codeChecks.yml"
7+
- ".goreleaser.yaml"
78
- "devenv.*"
89
- "cmd/**"
910
- "internal/**"
@@ -13,8 +14,7 @@ on:
1314

1415
jobs:
1516

16-
code_checks:
17-
17+
go_tests:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
max-parallel: 1
@@ -46,6 +46,14 @@ jobs:
4646
go-package: ./...
4747
work-dir: .
4848

49+
devenv_test:
50+
needs: go_tests
51+
runs-on: ubuntu-latest
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v5
56+
4957
- uses: cachix/install-nix-action@v31
5058
with:
5159
github_access_token: ${{ secrets.GITHUB_TOKEN }}
@@ -60,3 +68,28 @@ jobs:
6068
- name: Build the devenv shell and run any pre-commit hooks
6169
run: devenv test
6270
timeout-minutes: 15
71+
72+
goreleaser_test:
73+
needs: devenv_test
74+
runs-on: ubuntu-latest
75+
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v5
79+
with:
80+
fetch-depth: 0
81+
82+
- name: Set up QEMU
83+
uses: docker/setup-qemu-action@v3
84+
85+
- name: Set up Go
86+
uses: actions/setup-go@v6
87+
with:
88+
go-version: '1.25'
89+
90+
- name: Run GoReleaser test
91+
uses: goreleaser/goreleaser-action@v6
92+
with:
93+
version: "~> 2"
94+
args: release --snapshot --clean
95+
workdir: .

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ before:
1818
hooks:
1919
- go mod download
2020
- go mod tidy
21-
- go test
21+
- go test ./...
2222
- rm -rf completions
2323
- mkdir completions
2424
- sh -c 'go run . completion bash > completions/https-wrench.bash'

0 commit comments

Comments
 (0)