Skip to content

Commit

Permalink
Test on RustPython
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Feb 8, 2021
1 parent e795ede commit 542db36
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.4'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.5'

strategy:
fail-fast: False
Expand All @@ -23,7 +23,7 @@ jobs:
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.4", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand All @@ -46,6 +46,7 @@ jobs:

- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
5 changes: 3 additions & 2 deletions .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.4'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.5'

strategy:
fail-fast: False
Expand All @@ -23,7 +23,7 @@ jobs:
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.4", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand All @@ -47,6 +47,7 @@ jobs:

- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/python_ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: "macos-latest"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.4'
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.5'

strategy:
fail-fast: False
Expand All @@ -23,7 +23,7 @@ jobs:
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
- {python-version: "3.10.0-alpha.4", testenvs: "py310-dev,build", experimental: True}
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}

steps:
- name: Checkout 🛎️
Expand All @@ -46,6 +46,7 @@ jobs:

- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
50 changes: 50 additions & 0 deletions .github/workflows/rustpython_ci_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file is managed by 'repo_helper'. Don't edit it directly.
---
name: RustPython

on:
push:

jobs:
tests:
name: "ubuntu-20.04 / RustPython"
runs-on: "ubuntu-20.04"
env:
USING_COVERAGE: 'rustpython'
CARGO_TERM_COLOR: always

steps:
- name: Checkout 🛎️
uses: "actions/checkout@v2"

- name: Setup RustPython 🦀 🐍
run: |
git clone https://github.com/RustPython/RustPython
cargo install --path ./RustPython
rm -rf ./RustPython
- name: Install dependencies 🔧
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox virtualenv
python -m pip install --upgrade coverage_pyver_pragma
- name: "Run Tests for RustPython"
run: python -m tox -e rustpython

- name: "Upload Coverage 🚀"
uses: actions/upload-artifact@v2
if: always()
with:
name: "coverage-rustpython"
path: .coverage


- name: "Upload tempdir on failure"
uses: actions/upload-artifact@v2
if: failure()
with:
name: "pytest-tempdir"
path: /tmp/pytest-of-runner/pytest-0
1 change: 1 addition & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ python_versions:
- 3.8
- 3.9
- 3.10-dev
- rustpython

keywords:
- github
Expand Down
14 changes: 12 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
# * pytest

[tox]
envlist = py36, py37, py38, py39, py310-dev, mypy, build
envlist = py36, py37, py38, py39, py310-dev, rustpython, mypy, build
skip_missing_interpreters = True
requires =
pip>=20.3.3
tox-envlist>=0.1.0
isolated_build = True

[envlists]
test = py36, py37, py38, py39, py310-dev
test = py36, py37, py38, py39, py310-dev, rustpython
qa = mypy, lint
cov = py36, coverage

Expand Down Expand Up @@ -156,6 +156,16 @@ package = github3_utils
addopts = --color yes --durations 25
timeout = 300
[testenv:py310-dev]
setenv = PYTHONDEVMODE = 1
deps =
-r{toxinidir}/tests/requirements.txt
git+https://github.com/sigmavirus24/github3.py
extras = all
commands =
python --version
python -m pytest --cov=github3_utils -r aR tests/ {posargs}
[dep_checker]
name_mapping =
github3_py = github3
Expand Down

0 comments on commit 542db36

Please sign in to comment.