Repository navigation
65 lines (62 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
65 lines (62 loc) · 2.09 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
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
optional: false
- os: macos-latest
optional: false
- os: windows-latest
optional: true
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.optional }}
defaults:
run:
shell: bash
env:
CARGO_BUILD_JOBS: "2"
steps:
- uses: actions/checkout@v6
# rust-toolchain.toml pins the version and components.
- name: Install Rust
run: rustup toolchain install
- name: Check formatting
if: runner.os == 'Linux'
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --locked --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --locked --workspace --no-fail-fast
- name: Set up Secret Service
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y gnome-keyring libsecret-tools dbus-x11
eval "$(dbus-launch --sh-syntax)"
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> "$GITHUB_ENV"
echo "test-password" | gnome-keyring-daemon --unlock --components=secrets
- name: System keyring round trip
run: cargo test --locked --workspace --lib -- --ignored system_keyring_round_trip
- name: Check skill docs are current
if: runner.os == 'Linux'
run: |
cargo run --locked --example skill_docs
if [ -n "$(git status --porcelain skills)" ]; then
git status --short skills
echo "skills/linear-cli is out of date; run 'just skill-docs'" >&2
exit 1
fi
# Releases generate these notices; this catches a crate without a
# license file before release time.
- name: Generate third-party license notices
if: runner.os == 'Linux'
run: cargo xtask licenses --output "$RUNNER_TEMP/THIRD_PARTY_LICENSES.md"