Commit 7cffe23c by Sébastien Eustace

Revert "Revert "Setup CI with Github Actions (#1347)""

This reverts commit be03ab9e.
parent be03ab9e
build: false
environment:
PYTHONIOENCODING: "UTF-8"
matrix:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python35-x64"
- PYTHON: "C:/Python36-x64"
- PYTHON: "C:/Python37-x64"
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- "python -m pip install --disable-pip-version-check --user pip==18.1"
# Installing Poetry
- "python get-poetry.py --preview -y"
- "SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%"
# Install dependencies
- "poetry install -v"
test_script:
- "poetry run pytest --cov=poetry tests/ -W ignore"
name: Tests
on: [push]
jobs:
Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Linting
run: |
pip install pre-commit
pre-commit run --all-files
Linux:
needs: Linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python get-poetry.py --preview -y
source $HOME/.poetry/env
- name: Install dependencies
run: |
source $HOME/.poetry/env
poetry install
- name: Test
run: |
source $HOME/.poetry/env
poetry run pytest -q tests
MacOS:
needs: Linting
runs-on: macos-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python get-poetry.py --preview -y
source $HOME/.poetry/env
- name: Install dependencies
run: |
source $HOME/.poetry/env
poetry install
- name: Test
run: |
source $HOME/.poetry/env
poetry run pytest -q tests
Windows:
needs: Linting
runs-on: windows-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python get-poetry.py --preview -y
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
- name: Install dependencies
run: |
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
poetry install
- name: Test
run: |
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
poetry run pytest -q tests
...@@ -3,4 +3,4 @@ repos: ...@@ -3,4 +3,4 @@ repos:
rev: stable rev: stable
hooks: hooks:
- id: black - id: black
python_version: python3.6 language_version: python3.6
language: python
stages:
- linting
- test
cache:
pip: true
directories:
- "$HOME/.cache/pypoetry"
- "$HOME/.cache/pre-commit"
install:
- pip install pip==18.1
- python get-poetry.py --preview -y
- source $HOME/.poetry/env
- poetry install -v
script: pytest -q tests/
jobs:
include:
- python: "2.7"
- python: "3.5"
- python: "3.6"
- python: "3.7"
dist: xenial
- stage: linting
python: "3.6"
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files
...@@ -37,8 +37,8 @@ def clear_samples_dist(): ...@@ -37,8 +37,8 @@ def clear_samples_dist():
@pytest.mark.skipif( @pytest.mark.skipif(
sys.platform == "win32" and sys.version_info <= (3, 4), sys.platform == "win32" and sys.version_info <= (3, 6),
reason="Disable test on Windows for Python <=3.4", reason="Disable test on Windows for Python <=3.6",
) )
def test_wheel_c_extension(): def test_wheel_c_extension():
module_path = fixtures_dir / "extended" module_path = fixtures_dir / "extended"
...@@ -94,8 +94,8 @@ $""".format( ...@@ -94,8 +94,8 @@ $""".format(
@pytest.mark.skipif( @pytest.mark.skipif(
sys.platform == "win32" and sys.version_info <= (3, 4), sys.platform == "win32" and sys.version_info <= (3, 6),
reason="Disable test on Windows for Python <=3.4", reason="Disable test on Windows for Python <=3.6",
) )
def test_wheel_c_extension_src_layout(): def test_wheel_c_extension_src_layout():
module_path = fixtures_dir / "src_extended" module_path = fixtures_dir / "src_extended"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment