forked from Argus-Labs/world-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (85 loc) · 2.37 KB
/
test.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: Test
on:
pull_request:
paths-ignore:
- "docs/**"
push:
branches:
- main
paths-ignore:
- "docs/**"
env:
GO_VERSION: 1.22.1
jobs:
e2e:
name: E2E
runs-on:
- nscloud-ubuntu-22.04-amd64-4x16-with-cache-with-features
- nscloud-cache-tag-e2e
- nscloud-exp-features:privileged;host-pid-namespace
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false
- name: Install and configure Namespace CLI
uses: namespacelabs/nscloud-setup@v0
- name: Configure Namespace powered Buildx
uses: namespacelabs/nscloud-setup-buildx-action@v0
- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
- name: E2E Test - Nakama
run: make e2e-nakama
- name: E2E Test - EVM
run: make e2e-evm
- name: E2E docker compose logs last status
if: success() || failure()
run: |
docker compose logs
unit-test-coverage:
name: Unit & Coverage
runs-on: namespace-profile-linux-4vcpu-8gb-cached
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false
- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
- name: Run Unit Test
run: make unit-test-all
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
directory: "./"
swagger-check:
name: Swagger check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: "**/*.sum"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run swagger-check
run: make swagger-check