-
-
Notifications
You must be signed in to change notification settings - Fork 10
69 lines (55 loc) · 1.71 KB
/
test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This workflow will do a clean install of the dependencies and run tests across different versions
name: Verify
# Run this workflow every time a new commit is pushed to the repository
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
schedule:
# Weekly.
- cron: "0 0 * * 0"
jobs:
# borrowed from https://raw.githubusercontent.com/exercism/github-actions/main/.github/workflows/shellcheck.yml
shellcheck:
name: Run shellcheck on scripts
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Run shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
build:
name: Build and test
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Fetch origin/main
run: git fetch --depth=1 origin main
- name: Getting scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
- name: Verify all exercises
env:
DENYWARNINGS: "1"
run: bin/verify-exercises
format:
name: Format Cairo files
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Getting scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
- name: Format
run: ./bin/format_exercises.sh
- name: Diff
run: |
if ! git diff --color --exit-code; then
echo "Please run cargo fmt, or see the diff above:"
exit 1
fi