46 lines (41 loc) · 1.48 KB
/
tip.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
name: tip
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
schedule:
- cron: '36 9 * * *'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
sudo rm -fr /opt/hostedtoolcache/go /usr/local/go /usr/bin/go /bin/go
- name: install
run: |
curl -o go.tar.gz -L \
https://github.com/AlekSi/golang-tip/releases/download/tip/master.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go.tar.gz
sudo ln -s /usr/local/go/bin/* /usr/local/bin/
- uses: actions/checkout@v3
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up mode cache
uses: actions/cache@v2.1.7
with:
path: |
${{ steps.go-env.outputs.modcache }}
key: tip-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
tip-${{ runner.os }}-go-
- name: partial tip test
# NB: go test ./... fails with
# github.com/rogpeppe/go-internal/testscript
# /go/pkg/mod/github.com/rogpeppe/go-internal@v1.8.0/testscript/exe.go:231:51: not enough arguments in call to testing.MainStart
# have (nopTestDeps, nil, nil, nil)
# want (testing.testDeps, []testing.InternalTest, []testing.InternalBenchmark, []testing.InternalFuzzTarget, []testing.InternalExample
run: go test ./fileid/ ./internal/... ./telegram/...