Skip to content

Commit 2b3ff96

Browse files
authored
Update workflow for level1 challenge (#63)
# Purpose Workflow should run on pushes and PRs. The workflow should fail if an assertion fails.
1 parent 143f883 commit 2b3ff96

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: level1-challenge-test
22

3-
on:
4-
pull_request:
5-
branches: [level1]
3+
on: [push, pull_request]
64

75
jobs:
86
build:
@@ -11,7 +9,7 @@ jobs:
119
pull-requests: write
1210
steps:
1311
- name: Checkout Repo
14-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1513
- name: Build Application
1614
run: make all
1715
- name: Run Tests

challenge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
#include <stdint.h>
77

8-
#define ASSERT(x) if (!(x)) { printf("ASSERTION FAILED: %s\n", #x); } else { printf("ASSERTION PASSED: %s\n", #x); }
8+
#define ASSERT(x) if (!(x)) { printf("ASSERTION FAILED: %s\n", #x); exit(1); } else { printf("ASSERTION PASSED: %s\n", #x); }
99

10-
#endif // CHALLENGE_H
10+
#endif // CHALLENGE_H

0 commit comments

Comments
 (0)