-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.22 KB
/
rust_test.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
44
45
46
47
name: rust test
on:
push:
branches:
- main
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
# Check if files in the /test, /crates, or /lib directories or the
# /Cargo.lock, or /Cargo.toml files were changed in this PR.
detect-changes:
uses: ./.github/workflows/check_diff.yml
with:
pattern: ^test/\|^crates/\|^lib/\|^target/\|^Cargo\.lock$\|^Cargo\.toml$\|^\.github/workflows/rust_test\.yml$
test:
name: rust test
runs-on: ubuntu-latest-16core
needs: detect-changes
if: needs.detect-changes.outputs.changed == 'true'
steps:
- name: Checkout hyperdrive-rs
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
# NOTE: This is needed to ensure that hyperdrive-wrappers builds correctly.
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: test
run: cargo test --release --