-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (29 loc) · 820 Bytes
/
ci.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
name: CI
on:
push:
branches:
- master
jobs:
metadata:
runs-on: ubuntu-latest
outputs:
rust-version: ${{ steps.determine-rust-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- id: determine-rust-version
name: Determine Rust version
run: |
version=$(grep -m 1 'rust-version' Cargo.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
echo "Rust version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
build-and-test:
runs-on: ubuntu-latest
needs: [metadata]
steps:
- uses: actions/checkout@v4
- name: Setup toolchain
run: |
rustup override set ${{ needs.metadata.outputs.rust-version }}
- name: Test
run: |
cargo test --release