-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (61 loc) · 1.79 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: 'Test PR'
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality-checks:
name: 'Code Quality Checks & Unit Tests'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Install Python'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v9
- name: 'Run code quality checks'
run: make check
- name: 'Run pyupgrade'
run: make pyupgrade
- name: 'Run unit tests'
run: make cov-unit
integration-tests:
name: 'Integration Tests'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 5
env:
CONTAINER: imp-integration-${{ github.sha }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: ${CONTAINER}
- name: 'Build K definitions'
run: docker exec -u user ${CONTAINER} make kdist
- name: 'Run integration tests'
run: docker exec -u user ${CONTAINER} make cov-integration
- name: 'Tear down Docker container'
if: always()
run: |
docker stop --time=0 ${CONTAINER}
docker-tests:
name: 'Docker Tests'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 5
env:
TAG: ${{ github.sha }}
CONTAINER: imp-docker-${{ github.sha }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Build Docker image'
run: make docker TAG=${TAG}
- name: 'Run smoke tests'
run: docker run --rm --name ${CONTAINER} ${TAG} ./smoke-test.sh