Repository navigation
86 lines (72 loc) · 2.76 KB
/
Copy pathci.yml
File metadata and controls
86 lines (72 loc) · 2.76 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
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
HLEDGER_VERSION: "1.99.3"
HLEDGER_LINUX_X64_SHA256: "7a296cbf550a60fc6caf868dcd10d1df0c163c58597b4c40417415d6bd9b5deb"
jobs:
verify:
name: Run all tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust
run: |
rustup toolchain install stable --profile minimal --component rustfmt,clippy
rustup default stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2.9.1
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Install hledger
run: |
archive="${RUNNER_TEMP}/hledger-linux-x64.tar.gz"
curl --fail --location --retry 3 --silent --show-error \
--output "$archive" \
"https://github.com/simonmichael/hledger/releases/download/${HLEDGER_VERSION}/hledger-linux-x64.tar.gz"
echo "${HLEDGER_LINUX_X64_SHA256} ${archive}" | sha256sum --check -
sudo tar -xzf "$archive" -C /usr/local/bin hledger
installed_version="$(hledger --version | awk 'NR == 1 { gsub(/,$/, "", $2); print $2 }')"
test "$installed_version" = "$HLEDGER_VERSION"
- name: Install verification tools
run: |
cargo install cargo-deny --version 0.20.2 --locked
cargo install \
--git https://github.com/rtk-ai/rtk \
--rev b34be37caf3796b69a50952a28e60e32b5daad43 \
--locked \
rtk
- name: Install matching Dioxus CLI
run: |
dioxus_version="$(
cargo metadata --format-version 1 --locked |
jq -er '
[.packages[] | select(.name == "dioxus") | .version]
| unique
| if length == 1
then .[0]
else error("expected exactly one Dioxus version")
end
'
)"
cargo install dioxus-cli --version "$dioxus_version" --locked
- name: Check migrations against previous public main
if: github.event.before != '0000000000000000000000000000000000000000'
run: ./scripts/check-migrations-immutable "${{ github.event.before }}"
- name: Run full verification
run: ./scripts/verify-full