-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (53 loc) · 1.57 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
name: Trigger test suite
on:
pull_request:
push:
branches:
- main
jobs:
go-test:
name: Run tests defined for the project
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up go
id: go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
cache-dependency-file: 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: Trigger test suite
run: |
go test --short -v --covermode=atomic --coverprofile=coverage.out --coverpkg=./... ./...
- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
name: ${{ github.event.repository.name }}
verbose: true
editorconfig:
name: Run editorconfig checker
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main
- name: Run editorconfig checker against the repo
run: editorconfig-checker