-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (35 loc) · 896 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
on:
push:
branches:
- master
pull_request:
name: test
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
env:
PIXELA_USER: ${{ secrets.PIXELA_USER }}
PIXELA_TOKEN: ${{ secrets.PIXELA_TOKEN }}
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: '^1.15' # The Go version to download (if necessary) and use.
- name: Checkout code
uses: actions/checkout@v2
- name: Use Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -v -covermode=atomic