Repository navigation
59 lines (59 loc) · 1.88 KB
/
Copy pathci.yaml
File metadata and controls
59 lines (59 loc) · 1.88 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: ci
on:
push:
# Prevent writing to the repository using the CI token.
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions: read-all
env:
MAKEFLAGS: '-j 2'
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-go
if: success()
uses: actions/setup-go@v2
with:
go-version: '1.18.0'
- name: cache
if: success()
uses: actions/cache@v2
with:
path: |
~/.cache/buf-push-action/${{ runner.os }}/x86_64/bin
~/.cache/buf-push-action/${{ runner.os }}/x86_64/go/pkg/mod
~/.cache/buf-push-action/${{ runner.os }}/x86_64/include
~/.cache/buf-push-action/${{ runner.os }}/x86_64/versions
key: ${{ runner.os }}-buf-push-action-lint-${{ hashFiles('**/go.sum', 'make/**') }}
restore-keys: |
${{ runner.os }}-buf-push-action-lint-
- name: make-lint
if: success()
run: make lint
test:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup-go
if: success()
uses: actions/setup-go@v2
with:
go-version: '1.18.0'
- name: cache
if: success()
uses: actions/cache@v2
with:
path: |
~/.cache/buf-push-action/${{ runner.os }}/x86_64/bin
~/.cache/buf-push-action/${{ runner.os }}/x86_64/go/pkg/mod
~/.cache/buf-push-action/${{ runner.os }}/x86_64/include
~/.cache/buf-push-action/${{ runner.os }}/x86_64/versions
key: ${{ runner.os }}-buf-push-action-test-${{ hashFiles('**/go.sum', 'make/**') }}
restore-keys: |
${{ runner.os }}-buf-push-action-test-
- name: make-test
if: success()
run: make test