8000 Run tests on GitHub Actions (#187) · MarshalX/python-webrtc@9d4f977 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d4f977

Browse files
authored
Run tests on GitHub Actions (#187)
1 parent 36dfd57 commit 9d4f977

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
name: Build
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414

1515
steps:
1616
- name: Checkout repository.

.github/workflows/build_macos_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
build_wheels_for_macos:
1515
name: Build and publish wheels for macOS
16-
runs-on: macos-latest
16+
runs-on: macos-12
1717

1818
strategy:
1919
matrix:

.github/workflows/pytest.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and run tests
2+
3+
on:
4+
push:
5+
branches:
6+
- ci-pytest
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build_and_test:
13+
strategy:
14+
matrix:
15+
os: [ ubuntu-20.04, macos-12, windows-2019 ]
16+
17+
runs-on: ${{matrix.os}}
18+
continue-on-error: true
19+
20+
steps:
21+
- name: Checkout repository.
22+
uses: actions/checkout@v2
23+
with:
24+
submodules: recursive
25+
26+
- name: Move repository to disk C.
27+
if: matrix.os == 'windows-2019'
28+
run: xcopy . C:\src\ /E/H
29+
30+
- name: Setup Python.
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.9
34+
35+
- name: Build and install package.
36+
if: matrix.os == 'ubuntu-20.04'
37+
run: |
38+
python setup.py install
39+
sudo apt install -y python3.9-dev
40+
41+
- name: Build and install package.
42+
if: matrix.os == 'macos-12'
43+
run: python setup.py install
44+
45+
- name: Build and install package.
46+
if: matrix.os == 'windows-2019'
47+
working-directory: "C:/src"
48+
run: python setup.py install
49+
50+
- name: Install dev dependencies.
51+
run: pip install -r requirements-dev.txt
52+
53+
- name: Run tests.
54+
run: pytest tests -vv

0 commit comments

Comments
 (0)
0