-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (68 loc) · 1.76 KB
/
ci.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Continuous Integration
on: [push]
jobs:
format-go:
name: format-go
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go: [1.18]
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Format Go files
run: make fmt
- name: Exit If Git Diff
run: |
chmod +x ./scripts/exit_if_diff.sh
./scripts/exit_if_diff.sh
golangci-lint:
name: golangci-lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go: [1.18]
workdir: [backend_service, mongo_service, postgres_service]
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Lint ${{ matrix.workdir }}
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ${{ matrix.workdir }}
web:
name: client
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
defaults:
run:
working-directory: web
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "npm"
cache-dependency-path: web/package-lock.json
- name: Install packages
run: npm ci
- name: Prettier
run: npm run fmt:check
- name: ESLint
run: npm run lint:fix