-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
195 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Python codeqa/test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-lint | ||
- name: Install dependencies | ||
run: pip install flake8 | ||
- name: Run flake8 | ||
run: flake8 cbor2 tests | ||
|
||
test-py27: | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 2.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 2.7 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-test-2.7-ubuntu-latest | ||
- name: Install dependencies | ||
run: pip install -e .[test] | ||
- name: Test with pytest | ||
run: pytest | ||
|
||
test: | ||
needs: [lint] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8, pypy3] | ||
exclude: | ||
- os: macos-latest | ||
python-version: 3.7 | ||
- os: macos-latest | ||
python-version: pypy3 | ||
- os: windows-latest | ||
python-version: 3.7 | ||
- os: windows-latest | ||
python-version: pypy3 # https://github.com/python-trio/trio/issues/1361 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-test-${{ matrix.python-version }}-${{ matrix.os }} | ||
- name: Install dependencies | ||
run: pip install -e .[test] coveralls | ||
- name: Test with pytest | ||
run: pytest | ||
- name: Upload Coverage | ||
run: coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: ${{ matrix.test-name }} | ||
COVERALLS_PARALLEL: true | ||
|
||
coveralls: | ||
name: Finish Coveralls | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: pip install coveralls | ||
- name: Notify Coveralls | ||
run: coveralls --finish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Publish packages to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+" | ||
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | ||
|
||
jobs: | ||
linux-wheels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build manylinux Python wheels | ||
uses: RalfG/python-wheels-manylinux-build@v0.3.1-manylinux2014_x86_64 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-wheels | ||
path: dist/*-manylinux*.whl | ||
|
||
other-wheels: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-test-${{ matrix.python-version }}-${{ matrix.os }} | ||
- name: Install dependencies | ||
run: pip install pep517 | ||
- name: Create packages | ||
run: python -m pep517.build --binary . | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: other-wheels | ||
path: dist/*.whl | ||
|
||
sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: pip install pep517 | ||
- name: Create sdist | ||
run: python -m pep517.build --source . | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
publish: | ||
needs: | ||
- linux-wheels | ||
- other-wheels | ||
- sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download generated packaging artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Move the packages to dist/ | ||
run: | | ||
mkdir dist | ||
mv */*.whl */*.tar.gz dist | ||
- name: Upload packages | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 42", | ||
"wheel >= 0.29.0", | ||
"setuptools_scm[toml] >= 3.4" | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters