-
Notifications
You must be signed in to change notification settings - Fork 229
77 lines (68 loc) · 2.69 KB
/
test-heavy.yml
File metadata and controls
77 lines (68 loc) · 2.69 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
name: "Integration tests"
on:
workflow_dispatch: # Runs on manual calls
schedule:
- cron: "0 0 * * *" # Runs automatically every day
push:
branches: ["main"]
pull_request:
# Allow concurrent runs on main/release branches but isolates other branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
jobs:
heavy-tests:
# Job that runs all tests and publishes code coverage reports.
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: "Check for Go-related changes"
id: check_nibiru_go
uses: dorny/paths-filter@v3
with:
filters: |
nibiru-go:
- "app/**/*.go"
- "cmd/**/*.go"
- "eth/**/*.go"
- "gosdk/**/*.go"
- "x/**/*.go"
- "**/*.proto"
- "go.mod"
- "go.sum"
- "contrib/docker-compose/*"
- name: "Set up Go"
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
uses: actions/setup-go@v6
with:
go-version: 1.24
# cache: "The action has a built-in functionality for caching and
# restoring go modules and build outputs. It uses [actions/cache@v4]."
# - Handles go module cache (go env GOMODCACHE).
# - Handles go build cache (go env GOCACHE).
cache: true
- name: "Install just"
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
# casey/just: https://just.systems/man/en/chapter_6.html
# taiki-e/install-action: https://github.com/taiki-e/install-action
uses: taiki-e/install-action@just
- name: "Run all heavy tests."
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
run: just test-cover-heavy
- name: "Merge coverage reports with gocovermerge"
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
run: |
go install github.com/Unique-Divine/jiyuu/gocovmerge@v0.0.2
gocovmerge -o coverage.out \
coverage.group1.out coverage.group2.out coverage.group3.out
- name: "Upload coverage reports to Codecov"
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Docs on usable "with" flags for codecov/codecov-action v5:
# https://github.com/codecov/codecov-action?tab=readme-ov-file#example-workflowyml-with-codecov-action
with:
disable_search: true
files: coverage.out