-
Notifications
You must be signed in to change notification settings - Fork 16
81 lines (69 loc) · 2.01 KB
/
run-tests.yaml
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
77
78
79
80
81
name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
# # Required permissions
# permissions:
# pull-requests: read
# # Set job outputs to values from filter step
outputs:
relevant_files: ${{ steps.filter.outputs.relevant_files }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
relevant_files:
- 'nanolayer/**'
- 'tests/**'
- '.github/workflows/run-tests.yaml'
run-tests:
needs: [changes]
if: ${{ (needs.changes.outputs.relevant_files == 'true') || (github.event_name == 'workflow_dispatch') }}
strategy:
fail-fast: false
matrix:
config:
- {
subtest_dir: "tests/installers/apt"
}
- {
subtest_dir: "tests/installers/apt_get"
}
- {
subtest_dir: "tests/installers/aptitude"
}
- {
subtest_dir: "tests/installers/gh_release"
}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install latest devcontainer CLI"
run: npm install -g @devcontainers/cli
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: "yest docker platform"
run: |
DOCKER_DEFAULT_PLATFORM=linux/arm64 docker run -t ubuntu uname -a
- name: "Set up Python 3.8"
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: "Install python dependencies"
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build setuptools wheel setuptools-scm
pip install -r requirements.txt -r requirements-dev.txt
- name: "Test with pytest"
run: |
python -m pytest -s -v ${{ matrix.config.subtest_dir }}