generated from NethermindEth/rust-template
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 2.17 KB
/
test.yml
File metadata and controls
76 lines (65 loc) · 2.17 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
name: Build and test code
on:
push:
branches: ["main"] # Runs on pushes to main branch
paths:
- "**/*.rs"
- "**/Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "flake.nix"
- ".github/workflows/test.yml"
pull_request:
# Runs on pull_request events with these activity types:
# - opened: triggered when a new pull request is created.
# - reopened: triggered when a previously closed pull request is reopened.
# - synchronize: triggered when commits are pushed to the pull request branch (includes new commits and force-pushes).
# - ready_for_review: triggered when a draft pull request is marked as ready for review.
#
# In short: the workflow executes for new PRs, PRs reopened, PRs that receive updated commits,
# and when a draft PR becomes ready for review.
types: [synchronize, opened, reopened, ready_for_review]
paths:
- "**/*.rs"
- "**/Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "flake.nix"
- ".github/workflows/test.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings -C debuginfo=0"
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-24.04
- platform: linux/arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2
- name: Update apt package list
run: sudo apt-get update
- name: Install `protobuf`
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: protobuf-compiler=3.21.12*
version: 3.21.12
- name: Install `oas3-gen`
run: cargo install oas3-gen@0.24.0
- name: Build (all features)
run: cargo test --locked --workspace --all-features --no-run
- name: Run tests (all features)
run: cargo test --locked --workspace --all-features