This repository was archived by the owner on Nov 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 158
153 lines (149 loc) · 5.72 KB
/
Copy pathci.yml
File metadata and controls
153 lines (149 loc) · 5.72 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: CI
on:
push:
branches:
- master
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:
inputs:
avalanchegoRepo:
description: "avalanchego github repository"
required: true
default: "ava-labs/avalanchego"
avalanchegoBranch:
description: "avalanchego branch"
required: true
default: "master"
jobs:
lint_test:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.avalanchegoRepo }}
ref: ${{ github.event.inputs.avalanchegoBranch }}
path: avalanchego
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache-dependency-path: |
go.sum
tools/go.sum
- name: change avalanchego dep
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego
go mod tidy
go clean -modcache
- name: Run all lint checks
run: ./scripts/run_task.sh lint-all-ci
- name: Check go.mod and go.sum are up-to-date
run: ./scripts/run_task.sh check-go-mod-tidy
- name: Ensure consistent avalanchego version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/run_task.sh check-avalanchego-version
links-lint:
name: Markdown Links Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: umbrelladocs/action-linkspector@de84085e0f51452a470558693d7d308fbb2fa261 #v1.2.5
with:
fail_level: any
unit_test:
name: Golang Unit Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.avalanchegoRepo }}
ref: ${{ github.event.inputs.avalanchegoBranch }}
path: avalanchego
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache-dependency-path: |
go.sum
tools/go.sum
- name: change avalanchego dep
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego
go mod tidy
- run: go mod download
- name: Check generated codec files are up to date
run: ./scripts/run_task.sh check-generate-codec
- name: Check generated mocks are up to date
run: ./scripts/run_task.sh check-generate-mocks
- run: ./scripts/run_task.sh build
- run: ./scripts/run_task.sh build-test
env:
TIMEOUT: ${{ env.TIMEOUT }}
- run: ./scripts/run_task.sh coverage
avalanchego_e2e:
name: AvalancheGo E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.avalanchegoRepo }}
ref: ${{ github.event.inputs.avalanchegoBranch }}
path: avalanchego
token: ${{ secrets.AVALANCHE_PAT }}
- name: Run e2e tests
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@df4a8e531761a55d6878d6d2f16e9acb023de19d
with:
run: ./scripts/run_task.sh test-e2e-ci
prometheus_url: ${{ secrets.PROMETHEUS_URL || '' }}
prometheus_push_url: ${{ secrets.PROMETHEUS_PUSH_URL || '' }}
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
loki_url: ${{ secrets.LOKI_URL || '' }}
loki_push_url: ${{ secrets.LOKI_PUSH_URL || '' }}
loki_username: ${{ secrets.LOKI_ID || '' }}
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
e2e_warp:
name: e2e warp tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.avalanchegoRepo }}
ref: ${{ github.event.inputs.avalanchegoBranch }}
path: avalanchego
- name: Run Warp E2E Tests
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@df4a8e531761a55d6878d6d2f16e9acb023de19d
with:
run: ./scripts/run_task.sh test-e2e-warp-ci
artifact_prefix: warp
prometheus_url: ${{ secrets.PROMETHEUS_URL || '' }}
prometheus_push_url: ${{ secrets.PROMETHEUS_PUSH_URL || '' }}
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
loki_url: ${{ secrets.LOKI_URL || '' }}
loki_push_url: ${{ secrets.LOKI_PUSH_URL || '' }}
loki_username: ${{ secrets.LOKI_ID || '' }}
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}