-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (50 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
61 lines (50 loc) · 1.58 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
name: "CI"
concurrency:
cancel-in-progress: true
group: ${{github.workflow}}-${{github.ref}}
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "staging"
jobs:
ci:
runs-on: "macos-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"
- name: "Set up Sablier devkit and install Node.js dependencies"
uses: "sablier-labs/devkit/actions/setup@main"
with:
package-manager: "bun"
- name: "Set up Rust, Solana, and Anchor"
uses: "sablier-labs/gha-utils/.github/actions/anchor-toolchain@main"
with:
anchor-version: "0.31.1"
rust-version: "nightly"
solana-version: "2.1.21"
- name: "Cache Anchor build artifacts"
id: "cache-build"
uses: "sablier-labs/gha-utils/.github/actions/solana-cache@main"
with:
cache-path: target
- name: "Build the programs"
if: steps.cache-build.outputs.cache-status != 'primary'
run: "just build"
- name: "Run the Rust code checks"
if: steps.cache-build.outputs.cache-status != 'primary'
run: "just rust-check"
- name: "Run the other code checks"
run: | # shell
just prettier-check
just biome-check
just tsc-check
- name: "Run the tests"
if: steps.cache-build.outputs.cache-status != 'primary'
run: "just test-lite"
- name: "Add summary"
run: | # shell
echo "## CI result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY