Skip to content

Commit 5ba8852

Browse files
committed
Add workflow for cross-platform tests
- Skip tests in the release workflow accordingly.
1 parent 5a01bc4 commit 5ba8852

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
- name: Verify no code issue
3333
run: flake8 .
3434

35-
- name: Run tests
36-
run: tox -e py
37-
3835
- name: Upload to PyPI
3936
env:
4037
TWINE_USERNAME: __token__

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
test:
13+
name: Test ${{ matrix.os }}-${{ matrix.pyver }}-${{ matrix.arch }}
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [windows-latest]
19+
pyver: ['3.13', '3.12', '3.11', '3.10', '3.9']
20+
arch: [x64]
21+
include:
22+
- os: windows-latest
23+
pyver: '3.13'
24+
arch: x86
25+
- os: ubuntu-latest
26+
pyver: '3.13'
27+
arch: x64
28+
- os: macos-latest
29+
pyver: '3.13'
30+
arch: arm64
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ matrix.pyver }}
40+
architecture: ${{ matrix.arch }}
41+
42+
- name: Install package
43+
run: pip install .
44+
45+
- name: Run tests
46+
run: python -m unittest

0 commit comments

Comments
 (0)