-
Notifications
You must be signed in to change notification settings - Fork 24
50 lines (46 loc) · 1.35 KB
/
test-pr.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
name: 'Run Tests'
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: 'Build and run code quality checks'
run: make -C pykwasm check
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: 'Build and run unit tests'
run: make -C pykwasm 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
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kwasm-ci-${{ github.sha }}
- name: 'Build and run integration tests'
run: docker exec -u user kwasm-ci-${GITHUB_SHA} make -C pykwasm cov-integration
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-${GITHUB_SHA}