-
Notifications
You must be signed in to change notification settings - Fork 701
62 lines (54 loc) · 1.45 KB
/
unit-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
name: unit-test
on:
push:
paths-ignore:
- "website/**"
branches:
- "master"
pull_request_target:
paths-ignore:
- "website/**"
branches:
- "master"
jobs:
test:
name: Test on ubuntu
environment:
name: tablestore-live
env:
TABLESTORE_ACCESSKEYID_ENV: ${{ secrets.TABLESTORE_ACCESSKEYID_ENV }}
TABLESTORE_ACCESSKEYSECRET_ENV: ${{ secrets.TABLESTORE_ACCESSKEYSECRET_ENV }}
TABLESTORE_ENDPOINT_ENV: ${{ secrets.TABLESTORE_ENDPOINT_ENV }}
TABLESTORE_INSTANCE_ENV: ${{ secrets.TABLESTORE_INSTANCE_ENV }}
strategy:
fail-fast: true
matrix:
go: ["1.19.x"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: docker-compose
run: docker-compose -f test/docker-compose.yaml up -d
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go
- name: Get dependencies
run: |
go env
go mod tidy && git diff --exit-code go.mod go.sum
- name: Test
run: |
make unit-test
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
files: ./coverage.txt
name: jupiter
verbose: true