-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (69 loc) · 2.2 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: testing
on:
push:
pull_request:
workflow_dispatch:
jobs:
tests:
# We want to run on external PRs, but not on our own internal
# PRs as they'll be run by the push to the branch.
#
# The main trick is described here:
# https://github.com/Dart-Code/Dart-Code/pull/2375
#
# Also we want to run it always for manually triggered workflows.
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
golang:
- '1.13'
- '1.20'
steps:
- uses: actions/checkout@v3
- name: Setup golang ${{ matrix.golang }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.golang }}
- run: make test
build-target-tag:
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- run: make deps
- run: TT_TAG=master make
golangci-lint:
if: (github.event_name == 'push') ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
continue-on-error: true
with:
# The first run is for GitHub Actions error format.
args: -E goimports
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# The second run is for human-readable error format with a file name
# and a line number.
args: --out-${NO_FUTURE}format colored-line-number -E goimports