-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 976 Bytes
/
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
name: Tests
on:
workflow_dispatch:
pull_request:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
code_cov:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Setup token for pulling from emerishq private repos
run: |
go env -w GOPRIVATE=github.com/emerishq/*
git config --global url."https://git:${{ secrets.TENDERBOT_GIT_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Run Tests
run: make test
- name: Run Integration Tests
run: make integration-test
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.out