-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (79 loc) · 2.24 KB
/
pr.yaml
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
name: PR
on:
pull_request:
concurrency:
group: PR-${{ github.head_ref }}
cancel-in-progress: true
jobs:
invariants:
name: Invariants
runs-on: ubuntu-20-04-4-cores
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- name: Invariants
shell: bash
run: ./.github/scripts/invariants.sh
- name: TruffleHog OSS
uses: trufflesecurity/[email protected]
bootstrap:
name: Local E2E Tests
runs-on: ubuntu-20-04-4-cores
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Cache modules
uses: ./.github/actions/cache/golang
- uses: ./.github/actions/bootstrap
rewind:
name: Rewind Chain Tests
runs-on: ubuntu-20-04-4-cores
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Cache modules
uses: ./.github/actions/cache/golang
- uses: ./.github/actions/rewind
lint:
name: Lint
runs-on: ubuntu-20-04-4-cores
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # We need the full history to get the base commit in order to compute the diff in golanci-lint
- uses: actions/setup-go@v3
with:
go-version: 1.20.x
- name: Cache modules
uses: ./.github/actions/cache/golang
- name: Cache linter
uses: ./.github/actions/cache/golangci-lint
- name: Debug golangci-lint cache
run: |
golangci-lint cache status
- name: Lint
shell: bash
run: |
golangci-lint run \
--new-from-rev=${{ github.event.pull_request.base.sha || 'HEAD~'}} \
--concurrency=4 \
--out-format=github-actions \
--config .golangci.yml \
./...
tests:
name: Unit Tests
runs-on: ubuntu-20-04-4-cores
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: 1.20.x
- name: Cache modules
uses: ./.github/actions/cache/golang
- name: All Tests
shell: bash
run: |
go run build/ci.go install
go test $(go list ./... | grep -v 'go-ethereum/tests/immutable') -p 1 --parallel 4 -timeout=30m