-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (36 loc) · 952 Bytes
/
test.yaml
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
name: Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "**"
types:
- reopened
- ready_for_review
- synchronize
jobs:
main:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
tool-versions: .tool-versions
- name: Test the code
run: |
# Run the test and capture the output
output=$(scarb test 2>&1) || true
# Echo the entire output (optional, for debugging purposes)
echo "$output"
# Check if there were any failed tests
if echo "$output" | grep -q "test result: ok"; then
exit 0
else
exit 1
fi