-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
76 lines (62 loc) · 1.9 KB
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
name: CI
permissions:
contents: read
on:
pull_request:
branches:
- develop
push:
branches:
- develop
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust
run: rustup toolchain install stable --profile minimal --component clippy --component rustfmt
- name: Cache Cargo
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Check Formatting
run: cargo +stable fmt --check
- name: Run Clippy
run: cargo +stable clippy --all-targets -- -D warnings
- name: Run Tests
run: cargo +stable test --locked
- name: Check CLI Version
shell: bash
run: |
expected="why $(cargo +stable metadata --locked --no-deps --format-version 1 | python3 -c 'import json, sys; print(json.load(sys.stdin)["packages"][0]["version"])')"
actual="$(cargo +stable run --locked -- --version)"
test "$actual" = "$expected"
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run E2E Tests
run: ./tests/e2e/run.sh
env:
E2E_JOBS: 2
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Build Nix Package
run: nix build
- name: Run Nix Checks
run: nix flake check