-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (45 loc) · 1.4 KB
/
checks.yml
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
name: Run checks
on:
pull_request:
push:
branches:
- main
schedule:
# At 16:00 on Wednesday
- cron: "0 16 * * 3"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run fmt:check
test-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get scarb version
id: extractScarbVersion
run: |
snfoundry_version=$(curl -s https://api.github.com/repos/foundry-rs/starknet-foundry/releases/latest | grep tarball_url | awk -F '/' '{print $8}' | tr -d '",')
version=$(curl -s https://raw.githubusercontent.com/foundry-rs/starknet-foundry/$snfoundry_version/.tool-versions | awk '{print $2}')
echo "scarbVersion=$version" >> "$GITHUB_OUTPUT"
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ steps.extractScarbVersion.outputs.scarbVersion }}
- name: Test local action
uses: ./
with:
starknet-foundry-version: latest
- name: Create new project
run: snforge init myproject
- name: Run tests in the project
run: snforge test
working-directory: myproject