-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 1.1 KB
/
test.yml
File metadata and controls
42 lines (34 loc) · 1.1 KB
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
name: test
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Install Go
uses: actions/setup-go@v2
# Used to force dependencies to re-cache once a day so that we don't run
# into any weird cache invalidation problems, so to make sure that
# dependency fetches keep working.
- name: Get date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m-%d")"
shell: bash
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v2
with:
# Don't try to use variables in these paths. They don't seem to work
# and it'll lead to hours of confusion. You can use a `~`, but I've
# expanded HOME so that finding things is easier.
path: |
/home/runner/go/bin/
/home/runner/go/pkg/mod/
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-cache-dependencies-v2
- name: Checkout
uses: actions/checkout@v2
- name: "Go: Test"
run: go test