Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch to GitHub Actions #2127

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
# TODO: Line 15, enable python-version: 3.5
# TODO: Line 36, enable pytest --doctest-modules

name: Python_tests
on: [push, pull_request]
name: Python Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
Python_tests:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 15
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
python-version: [2.7, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Add msbuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.0.0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -29,12 +40,9 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest (Linux and macOS)
if: matrix.os != 'windows-latest'
run: pytest
- name: Test with pytest (Windows)
if: matrix.os == 'windows-latest'
- name: Test with pytest
shell: bash
run: GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
run: |
python -m pytest
# - name: Run doctests with pytest
# run: pytest --doctest-modules
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
strategy:
fail-fast: false
matrix:
node: [10.x, 12.x, 14.x]
python: [2.7, 3.6, 3.7, 3.8]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove 2.7 since it's EOL

os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
env:
PYTHON_VERSION: ${{ matrix.python }}
- name: Add msbuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.0.0
- name: Install Dependencies
run: |
python -m pip install --upgrade pip flake8 pytest
npm install
- name: Lint Python
run: |
python -m flake8 --version
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
- name: Run Tests
run: |
npm test
python -m pytest
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.