-
-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (50 loc) · 1.8 KB
/
ci.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
name: CI
on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
job1:
name: Nim Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
- name: Cache nimble
id: cache-nimble
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
- uses: jiro4989/setup-nim-action@f6b28cfdfcbc9c2364429bd585ad5f850ea64498
with:
nim-version: '1.6.6'
- name: Compile and run tests with `nimble test`
run: "nimble test -y"
job2:
name: Smoke test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
- uses: jiro4989/setup-nim-action@f6b28cfdfcbc9c2364429bd585ad5f850ea64498
with:
nim-version: '1.6.6'
- name: Cache nimble
id: cache-nimble
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
- name: "Install nimble dependencies"
if: steps.cache-nimble.outputs.cache-hit != 'true'
run: "nimble install -y -d"
- name: "Compile representer"
run: "nimble c -d:release src/representer"
- name: "Make representation of `two-fer`"
run: "bin/run.sh two-fer ${PWD}/tests/cases/example-two-fer/ ${PWD}/tests/cases/example-two-fer/"
- name: "Check diffs"
run: |
diff -y tests/cases/example-two-fer/mapping.json tests/cases/example-two-fer/expected/mapping.json
diff -y tests/cases/example-two-fer/representation.txt tests/cases/example-two-fer/expected/representation.txt