-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (33 loc) · 939 Bytes
/
exception-bug.yml
File metadata and controls
42 lines (33 loc) · 939 Bytes
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
name: exception-bug
on:
pull_request:
paths:
- 'error-handling/tasks/dangerous-exceptions/**'
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install CMake
run: sudo apt-get update && sudo apt-get install -y cmake libgtest-dev
- name: Configure and build
run: |
cd error-handling/tasks/dangerous-exceptions
cmake -S . -B build
cmake --build build
- name: Run tests
run: |
cd error-handling/tasks/dangerous-exceptions/build
./solution_test
- name: Get diff
uses: technote-space/get-diff-action@v6
- name: Fail if solution_test.cpp is modified
run: |
if echo $GIT_DIFF | fgrep 'dangerous-exceptions/solution_test'; then
exit 1
else
echo "OK"
fi