-
Notifications
You must be signed in to change notification settings - Fork 13
98 lines (79 loc) · 2.4 KB
/
test.yaml
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
89
90
91
92
93
94
95
96
97
98
name: Trigger test suite
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Test the catalyst project
runs-on: ubuntu-latest-m
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up go
id: go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: "1.20.5"
cache: true
cache-dependency-path: go.sum
- name: Install go modules
if: steps.go.outputs.cache-hit != 'true'
run: go mod download
- name: go fmt
run: |
go fmt ./...
git diff --exit-code
- name: Run Revive Action by building from repository
uses: docker://morphy/revive-action:v2
with:
config: config.toml
- name: misspell
uses: reviewdog/action-misspell@v1
- name: Install FFMPEG
uses: FedericoCarboni/setup-ffmpeg@v2
- name: Run tests with coverage
run:
go test --covermode=atomic --coverprofile=coverage.out $(go list ./...
| grep -v 'test/e2e')
- name: Build Docker image
run: make docker DOCKER_TAG=catalyst-e2e-test
- name: Build Docker Box image
run: make box
- name: Run E2E tests
run:
go test $(go list ./... | grep 'test/e2e') --timeout 15m --image
catalyst-e2e-test
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
name: ${{ github.event.repository.name }}
token: ${{ secrets.CI_CODECOV_TOKEN }}
codeql:
name: Perform CodeQL analysis
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2