Skip to content

Commit 3922695

Browse files
committed
Add Github Actions Testing
1 parent c7de934 commit 3922695

File tree

4 files changed

+104
-47
lines changed

4 files changed

+104
-47
lines changed

.github/workflows/dist.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
name: dist
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: psf/black@stable
16+
17+
build:
18+
runs-on: ubuntu-18.04
19+
steps:
20+
- uses: actions/checkout@v1
21+
- uses: actions/setup-python@v1
22+
with:
23+
python-version: 3.6
24+
25+
- name: Install build dependencies
26+
run: |
27+
python -m pip install wheel
28+
29+
- uses: robotpy/build-actions/build-sdist@v2021
30+
- uses: robotpy/build-actions/build-wheel@v2021
31+
32+
- name: Upload build artifacts
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: dist
36+
path: dist
37+
38+
test:
39+
needs: [build]
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
backend: [pure, pyntcore]
45+
os: [windows-latest, macos-latest, ubuntu-18.04]
46+
python_version: [3.6, 3.7, 3.8, 3.9]
47+
architecture: [x86, x64]
48+
exclude:
49+
- os: macos-latest
50+
architecture: x86
51+
- os: ubuntu-18.04
52+
architecture: x86
53+
54+
steps:
55+
- uses: actions/checkout@v1
56+
- uses: actions/setup-python@v1
57+
with:
58+
python-version: ${{ matrix.python_version }}
59+
architecture: ${{ matrix.architecture }}
60+
61+
- name: Download build artifacts
62+
uses: actions/download-artifact@v2
63+
with:
64+
name: dist
65+
path: dist
66+
67+
- name: Install pyntcore backend
68+
if: ${{ matrix.backend == 'pyntcore' }}
69+
run: |
70+
python -m pip install pyntcore --find-links https://www.tortall.net/\~robotpy/wheels/2021/linux_x86_64/
71+
72+
- uses: robotpy/build-actions/test-native-wheel@v2021
73+
# continue-on-error: ${{ matrix.backend == 'pyntcore' }}
74+
75+
publish:
76+
runs-on: ubuntu-latest
77+
needs: [check, test]
78+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
79+
80+
steps:
81+
- name: Download build artifacts
82+
uses: actions/download-artifact@v2
83+
with:
84+
name: dist
85+
path: dist
86+
87+
- name: Publish to PyPI
88+
uses: pypa/gh-action-pypi-publish@master
89+
with:
90+
user: __token__
91+
password: ${{ secrets.pypi_password }}

.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
File renamed without changes.

tests/run_tests.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
from os.path import abspath, dirname
5+
import sys
6+
import subprocess
7+
8+
if __name__ == "__main__":
9+
10+
root = abspath(dirname(__file__))
11+
os.chdir(root)
12+
13+
subprocess.check_call([sys.executable, "-m", "pytest", "-vv"])

0 commit comments

Comments
 (0)