-
Notifications
You must be signed in to change notification settings - Fork 34
66 lines (55 loc) · 1.74 KB
/
ci.yml
File metadata and controls
66 lines (55 loc) · 1.74 KB
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
62
63
64
65
66
name: build
on:
push:
branches:
- main
pull_request:
jobs:
job-test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
pull-requests: write
actions: write
steps:
- name: Check out source code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Set up pnpm
uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
with:
package_json_file: internal/frontend/package.json
- name: Generate frontend assets
run: go generate ./internal/static/
- name: Run oxlint
if: runner.os == 'Linux'
run: cd internal/frontend && pnpm install && pnpm run lint
- name: Run oxfmt check
if: runner.os == 'Linux'
run: cd internal/frontend && pnpm run fmt:check
- name: Run lint
if: runner.os == 'Linux'
uses: reviewdog/action-golangci-lint@c76cceaaab89abe74e649d2e34c6c9adc26662d2 # v2.10.0
with:
fail_level: error
go_version_file: go.mod
cache: false
- name: Run gostyle
if: runner.os == 'Linux'
uses: k1LoW/gostyle-action@e1b847d37b3041c5fdb8b911bcf00b350779ca61 # v1.5.1
with:
config-file: .gostyle.yml
- name: Run tests
run: make ci
- name: Run octocov
if: runner.os == 'Linux'
uses: k1LoW/octocov-action@73d561f65d59e66899ed5c87e4621a913b5d5c20 # v1.5.0