-
Notifications
You must be signed in to change notification settings - Fork 126
62 lines (59 loc) · 1.58 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
name: Tests
on:
pull_request:
push:
branches:
- master
- release/**
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
go-version: 1.19
- name: Display Go Version
run: go version
- name: Install tparse
run: |
export GO111MODULE="on" && go install github.com/mfridman/tparse@latest
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tparse-binary
test-unit:
runs-on: ubuntu-cpu16-ram64
steps:
- name: Set up go
uses: actions/[email protected]
with:
go-version: 1.19
- name: Checkout source
uses: actions/[email protected]
- name: Generate LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Pull LFS files
run: git lfs pull
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
- name: Test unit
run: |
make test-unit