-
Notifications
You must be signed in to change notification settings - Fork 14
96 lines (74 loc) · 2.23 KB
/
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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: main
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_TOOLCHAIN_VERSION : "nightly"
jobs:
check_code_format_and_lint:
name: Check code formatting and linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: setup toolchain
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ env.RUST_TOOLCHAIN_VERSION }}
- name: install_dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: check-fmt
run: cargo fmt --check
- name: clippy
run: cargo clippy -- -D warnings
build_and_test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: Build and test manga tui
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: setup toolchain
uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ env.RUST_TOOLCHAIN_VERSION }}
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: sudo apt install libdbus-1-dev pkg-config
- name: check
run: cargo check --locked
- name: build
run: cargo build --release --verbose
- name: install cargo nextest
run: cargo install [email protected]
- name: test
run: cargo nextest run --no-fail-fast
- name: run ignored tests
run: cargo nextest run -- --ignored
build_nix_targets:
name: Build Nix targets
runs-on: ubuntu-latest
permissions:
id-token: "write"
contents: "read"
steps:
- uses: actions/checkout@v4
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v3
- name: Activate Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-flakehub: false
- name: install_dependencies
run: sudo apt install libdbus-1-dev pkg-config
- name: Build default package
run: nix build