Skip to content

Commit

Permalink
Update workflow for level1 challenge (#63)
Browse files Browse the repository at this point in the history
# Purpose
Workflow should run on pushes and PRs. The workflow should fail if an
assertion fails.
  • Loading branch information
dgobalak authored Jul 14, 2023
1 parent 143f883 commit 2b3ff96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: level1-challenge-test

on:
pull_request:
branches: [level1]
on: [push, pull_request]

jobs:
build:
Expand All @@ -11,7 +9,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build Application
run: make all
- name: Run Tests
Expand Down
4 changes: 2 additions & 2 deletions challenge.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

#include <stdint.h>

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

#endif // CHALLENGE_H
#endif // CHALLENGE_H

0 comments on commit 2b3ff96

Please sign in to comment.