-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 1.31 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: qernal-ci
on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
# validate commits
commit:
if: '! github.event.pull_request.draft'
uses: ./.github/workflows/conventional-commits.yaml
with:
lint_only: true
# run go lint
lint:
permissions:
contents: read
pull-requests: read
checks: write
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run Go linter
uses: golangci/golangci-lint-action@v6
with:
install-mode: "binary"
# run go tests
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run tests
env:
# TODO: switch from the build environment
QERNAL_HOST_CHAOS: https://chaos.bld2.qernal-bld.dev
QERNAL_HOST_HYDRA: https://hydra.bld2.qernal-bld.dev
QERNAL_TOKEN: ${{ secrets.QERNAL_CI_TOKEN }}
run: |
for dir in $(go list ./commands/...); do
go test -v $dir
done