-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (48 loc) · 1.34 KB
/
test-linux.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
48
49
50
51
52
53
54
55
56
57
name: "Test - linux"
on:
workflow_call:
workflow_dispatch:
inputs:
ssh:
description: 'Set up an SSH session before running `cargo test`?'
type: boolean
required: true
default: false
jobs:
linux:
runs-on: ubuntu-latest
name: "Rust: ${{ matrix.config.rust }}"
strategy:
fail-fast: false
matrix:
config:
- { rust: 'stable' }
- { rust: 'nightly' }
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Update build environment
run: |
sudo apt-get update
- name: Install nightly rust
uses: dtolnay/rust-toolchain@nightly
if: matrix.config.rust == 'nightly'
- name: Report rust toolchain
run: rustup show
- name: Rust cache
uses: Swatinem/rust-cache@v2
# Cache isn't useful on nightly, it would be thrown away every day
if: matrix.config.rust != 'nightly'
- name: Setup SSH access
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.ssh }}
timeout-minutes: 30
- name: Build
run: cargo build
- name: Run unit tests
env:
AIR_LOG_LEVEL: trace
# `--nocapture` to see our own `tracing` logs
run: cargo test -- --nocapture