-
Notifications
You must be signed in to change notification settings - Fork 37
63 lines (59 loc) · 1.91 KB
/
Copy pathrust.yml
File metadata and controls
63 lines (59 loc) · 1.91 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
name: rust
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
paths-ignore:
- "website/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CI_BUILD: "--locked"
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup update
- run: rustup target add wasm32v1-none
- run: rustup component add rustfmt clippy
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev pkg-config libudev-dev
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@just
- uses: cargo-bins/cargo-binstall@main
- uses: mozilla-actions/sccache-action@v0.0.10
- name: Run cargo fmt
run: cargo fmt --all -- --check
- uses: stellar/stellar-cli@v26.0.0
- name: build since clippy needs contracts to be built
run: just build
- name: Run cargo clippy
run: just clippy
- name: Run cargo clippy on tests
run: just clippy-test
# `init_copies_frontend_template` degits the UI monorepo. If this PR's
# branch name also exists there, pin to it so coordinated cross-repo
# changes can go green before merging.
- name: Resolve UI repo ref
run: |
REF="${{ github.head_ref }}"
if [ -n "$REF" ] && git ls-remote --exit-code --heads \
https://github.com/stellar-scaffold/ui "$REF" >/dev/null 2>&1; then
echo "STELLAR_SCAFFOLD_UI_REPO=stellar-scaffold/ui#$REF" >> "$GITHUB_ENV"
echo "Pinned UI monorepo -> $REF"
else
echo "Using default UI monorepo (main)"
fi
- name: Unit Tests
run: just test