This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
72 lines (58 loc) · 1.74 KB
/
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
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
on:
pull_request:
push:
branches:
- main
name: continuous-integration
env:
NUSHELL_CARGO_PROFILE: ci
NU_LOG_LEVEL: DEBUG
CLIPPY_OPTIONS: "-D warnings"
jobs:
fmt-clippy:
strategy:
fail-fast: true
matrix:
# Pinning to Ubuntu 20.04 because building on newer Ubuntu versions causes linux-gnu
# builds to link against a too-new-for-many-Linux-installs glibc version. Consider
# revisiting this when 20.04 is closer to EOL (April 2025)
platform: [macos-latest, ubuntu-20.04, windows-latest]
feature: [default]
include:
- feature: default
flags: ""
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]
with:
rustflags: ""
- name: cargo fmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace ${{ matrix.flags }} -- $CLIPPY_OPTIONS
# In tests we don't have to deny unwrap
- name: Clippy of tests
run: cargo clippy --tests --workspace ${{ matrix.flags }} -- -D warnings
tests:
strategy:
fail-fast: true
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
feature: [default]
include:
- feature: default
flags: ""
flags:
- # default
- --all-features
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]
with:
rustflags: ""
- name: Tests
run: cargo test ${{ matrix.flags }}