-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1007 Bytes
/
unit-tests.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
name: unit-tests
on:
push:
branches:
- main
pull_request:
paths:
- 'aggregator/**'
- 'core/**'
- 'indexer/**'
- 'offchain/**'
- 'operator/**'
- 'plugin/**'
- 'relayer/**'
jobs:
go_test:
name: Go Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Test
run: make tests-unit
rust_test:
name: Rust Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- 'indexer/**'
- 'offchain/**'
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: steps.filter.outputs.rust == 'true'
- run: RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo test # Allow 'dead code' since most containers are not used in unit tests