69 lines (53 loc) · 1.32 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- '6379:6379'
datastore-emulator:
image: motemen/datastore-emulator
ports:
- '8081:8081'
env:
CLOUDSDK_CORE_PROJECT: prchecklist-test
env:
TEST_REDIS_URL: 'redis://localhost:6379'
DATASTORE_EMULATOR_HOST: 'localhost:8081'
DATASTORE_PROJECT_ID: prchecklist-test
steps:
- uses: actions/setup-go@v1
with:
go-version: 1.14
- uses: actions/setup-node@v1.1.0
- uses: actions/checkout@v2
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
make setup
- run: |
make lint
- run: |
make build
- run: |
make test
- uses: codecov/codecov-action@v1.0.6