-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (67 loc) · 1.74 KB
/
test-rust.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This workflow will build and test the Rust code in this repository. There are
# separate workflows for testing the python portion of the code base.
#
# This file is *not* generated from automation and is manually maintained.
#
name: "[tower] Test rust"
on:
pull_request:
push:
branches:
- '*'
tags-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
RUST_BACKTRACE: 1
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Compile tests
run: >
cargo test --all-features --no-run
- name: Run tests
if: github.ref_name != 'main'
run: >
cargo test --all-features
env:
RUST_LOG: debug
# integration-test:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: true
# matrix:
# os: [ubuntu-latest, windows-latest]
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up Rust
# run: rustup show
#
# - name: Cache Rust
# uses: Swatinem/rust-cache@v2
# with:
# save-if: ${{ github.ref_name == 'main' }}
#
# - name: Compile integration tests
# run: cargo test --all-features --test it --no-run
#
# - name: Run integration tests
# if: github.ref_name != 'main'
# run: cargo test --all-features -p polars --test it