This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (70 loc) · 2.45 KB
/
check.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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: 'Check'
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Run code quality checks'
run: make check
- name: 'Run pyupgrade'
run: make pyupgrade
unit-tests:
needs: code-quality-checks
name: 'Unit Tests'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Run unit tests'
run: make cov-unit
integration-tests:
needs: code-quality-checks
name: 'Integration Tests'
runs-on: [self-hosted, linux, normal]
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Build Docker image'
run: |
COMMIT=$(git rev-parse --short=7 HEAD)
K_VERSION=$(cat deps/k_release)
docker build . \
--file .github/workflows/Dockerfile \
--build-arg K_VERSION=${K_VERSION} \
--tag runtimeverificationinc/proof-generation-ci:${COMMIT}
docker run \
--name proof-generation-ci \
--rm \
--interactive \
--tty \
--detach \
--workdir /home/user \
runtimeverificationinc/proof-generation-ci:${COMMIT}
docker cp . proof-generation-ci:/home/user
docker exec proof-generation-ci chown -R user:user /home/user
- name: 'Set Python version'
run: docker exec --user user proof-generation-ci poetry env use 3.10
- name: 'Run integration tests'
run: docker exec --user user proof-generation-ci make cov-integration COV_ARGS=-n8
- name: 'Verify Metamath proofs'
run: docker exec --user user proof-generation-ci make test-metamath-prelude
- name: 'Verify IMP definition using Metamath'
run: docker exec --user user proof-generation-ci make test-metamath-imp
- name: 'Tear down Docker container'
if: always()
run: |
docker stop --time=0 proof-generation-ci