-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (64 loc) · 1.73 KB
/
ci_server.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
name: ci-server
on:
push:
branches: [main, release]
paths:
- server/**
- .github/workflows/ci_server.yml
- .github/workflows/server_build.yml
- .github/workflows/deploy_test.yml
- .github/workflows/pr_title.yml
- .github/workflows/stage.yml
- .github/workflows/release.yml
- .github/workflows/server_build.yml
pull_request:
paths:
- server/**
- .github/workflows/ci_server.yml
- .github/workflows/server_build.yml
- .github/workflows/deploy_test.yml
- .github/workflows/pr_title.yml
- .github/workflows/stage.yml
- .github/workflows/release.yml
jobs:
ci:
name: ci
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
services:
mongo:
image: mongo:6-focal
ports:
- 27017:27017
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: checkout
uses: actions/checkout@v4
- name: cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.54
working-directory: server
args: --config=../.golangci.yml
- name: test
run: go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic
env:
REEARTH_CMS_DB: mongodb://localhost
- name: codecov
uses: codecov/codecov-action@v4
with:
flags: server
file: coverage.txt
- name: check forgotten translations
run: make i18n-ci