-
Notifications
You must be signed in to change notification settings - Fork 2.3k
55 lines (52 loc) · 1.77 KB
/
test.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
name: Unit Tests
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
test_x86_64:
name: "Build ${{ matrix.pyver }} on ${{ matrix.os }}"
strategy:
matrix:
pyver: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyver }}
- name: Install dependencies
run: |
python -m pip install --disable-pip-version-check --upgrade pip
pip install -U -r requirements.txt -r requirements-dev.txt
#Install locally to support tests
pip install -e .
- name: Test with pytest
run: pytest
test_aarch64:
name: "Build aarch64 ${{ matrix.pyver }}"
strategy:
matrix:
pyver: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312]
fail-fast: false
runs-on: ubuntu-latest
env:
py: /opt/python/${{ matrix.pyver }}/bin/python
img: quay.io/pypa/manylinux2014_aarch64
steps:
- name: Checkout
uses: actions/checkout@v4
- run: |
docker run --rm --privileged hypriot/qemu-register
- uses: docker://quay.io/pypa/manylinux2014_aarch64
with:
args: |
bash -c "${{ env.py }} -m pip install virtualenv && ${{ env.py }} -m venv .env && \
source .env/bin/activate && \
pip install --upgrade setuptools && \
python -m pip install --disable-pip-version-check --upgrade pip && \
pip install -U -r requirements.txt -r requirements-dev.txt && \
pip install -e . && \
pytest && \
deactivate"