Skip to content

Commit cc7a739

Browse files
committed
ci: define main checks
1 parent 003c540 commit cc7a739

3 files changed

Lines changed: 40 additions & 29 deletions

File tree

.github/actions/setup-workspace/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
- name: Set up Golang
99
uses: actions/setup-go@v5
1010
with:
11-
go-version: "1.24"
11+
cache: false
1212

1313
- name: Install Just
1414
uses: extractions/setup-just@v2

.github/workflows/compliance.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Compliance Checks
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
name: Run linters
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v5
20+
21+
- name: Setup workspace
22+
uses: ./.github/actions/setup-workspace
23+
24+
- name: Install linters
25+
run: |
26+
pip install --upgrade pip
27+
pip install pre-commit==3.5.0
28+
29+
- name: Install dependencies
30+
run: |
31+
just tidy
32+
go install golang.org/x/tools/cmd/goimports@latest
33+
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
34+
35+
- name: Lint
36+
run: pre-commit run --all-files
Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: CI/CD
2+
name: CICD
33

44
on:
55
push:
@@ -10,37 +10,12 @@ on:
1010
- main
1111

1212
jobs:
13-
lint:
14-
name: Run linters
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
20-
21-
- name: Setup workspace
22-
uses: ./.github/actions/setup-workspace
23-
24-
- name: Install linters
25-
run: |
26-
pip install --upgrade pip
27-
pip install pre-commit==3.5.0
28-
29-
- name: Install dependencies
30-
run: |
31-
just tidy
32-
go install golang.org/x/tools/cmd/goimports@latest
33-
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
34-
35-
- name: Run linters
36-
run: pre-commit run --all-files
37-
3813
test:
3914
name: Run unit tests
4015
runs-on: ubuntu-latest
4116
steps:
4217
- name: Checkout repository
43-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
4419

4520
- name: Run setup
4621
uses: ./.github/actions/setup-workspace
@@ -56,7 +31,7 @@ jobs:
5631
needs: test
5732
steps:
5833
- name: Checkout repository
59-
uses: actions/checkout@v4
34+
uses: actions/checkout@v5
6035

6136
- name: Run setup
6237
uses: ./.github/actions/setup-workspace

0 commit comments

Comments
 (0)