Skip to content

Commit 63c60af

Browse files
authored
Enable GitHub Actions runners to run tests (hardbyte#827)
GitHub announced Actions at GitHub Universe in 2018, however this was somewhat limited, and support for running CI/CD pipelines was only released in August 2019. This was in beta for a long time, and finally has been rolled out to the general public. This adds a minimal GitHub Actions workflow that runs all the current tests on a build matrix consisting of {Ubuntu,macOS,Windows} and Python 3.{6,7,8}. This also seems to run much faster than the current Travis CI pipelines, and actually lets us cover multiple versions on macOS without a series of hacks. Unfortunately, the kernel that GitHub Actions uses (5.0.0-1035-azure) doesn't include the vcan kernel module, so we still need Travis CI to run SocketCAN tests.
1 parent a9d03da commit 63c60af

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
python-version: [3.6, 3.7, 3.8]
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[test]
22+
- name: Test with pytest
23+
run: |
24+
pytest

0 commit comments

Comments
 (0)