-
-
Notifications
You must be signed in to change notification settings - Fork 468
74 lines (71 loc) · 1.85 KB
/
master.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
name: master builder
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
permissions:
contents: read
pull-requests: read
jobs:
lint:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
directory:
- .
- core
- extension
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang env
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false # conflict with golangci-lint cache
- name: lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
working-directory: ${{ matrix.directory }}
unit-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang env
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Build
run: go build
- name: Unit Test
run: go test -v $(go list ./... | grep -v /test) # skip e2e test
e2e-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang env
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: Setup Teamgram Env
run: |
git clone https://github.com/iyear/teamgram-server.git
cd teamgram-server
git checkout 3cc9864cda9a4eb45b61542494dfe517bf643372
sudo docker compose -f ./docker-compose-env.yaml up -d --quiet-pull
sudo docker compose up -d --quiet-pull
- name: Build
run: go build
- name: E2E Test
run: ginkgo -v -r ./test