-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (48 loc) · 1.34 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
name: Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, labeled]
env:
GO_VERSION: "1.21.0"
GOPRIVATE: github.com/sedaprotocol/vrf-go
GITHUB_TOKEN: ${{ secrets.PAT }}
permissions:
contents: read
repository-projects: read
packages: read
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
cache-dependency-path: go.sum
- run: git config --global url.https://${GITHUB_TOKEN}@github.com/.insteadOf https://github.com/
- name: Test & coverage report creation
run: make test-unit-cover
- uses: actions/upload-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
e2e-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- run: git config --global url.https://${GITHUB_TOKEN}@github.com/.insteadOf https://github.com/
- name: Test e2e
run: |
make test-e2e