-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
1 parent
f8ef582
commit 1fb6ed7
Showing
5 changed files
with
141 additions
and
128 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 |
---|---|---|
@@ -1,113 +1,86 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
linter: talkiq/linter@3.1.0 | ||
linter: talkiq/linter@4 | ||
|
||
executors: | ||
python-minimum: | ||
py36: | ||
docker: | ||
# N.B. lowest common denominator, don't want to error on not using the | ||
# latest syntax. | ||
- image: python:3.10.7 | ||
- image: python:3.6-alpine | ||
resource_class: small | ||
py37: | ||
docker: | ||
- image: python:3.7-alpine | ||
resource_class: small | ||
py38: | ||
docker: | ||
- image: python:3.8-alpine | ||
resource_class: small | ||
py39: | ||
docker: | ||
- image: python:3.9-alpine | ||
resource_class: small | ||
py310: | ||
docker: | ||
- image: python:3.10-alpine | ||
resource_class: small | ||
pypy731: # py36 | ||
docker: | ||
- image: pypy:3-7.3.1-slim | ||
resource_class: small | ||
pypy735: # py37 | ||
docker: | ||
- image: pypy:3-7.3.5-slim | ||
resource_class: small | ||
pypy737: # py37+py38 | ||
docker: | ||
- image: pypy:3-7.3.7-slim | ||
resource_class: small | ||
pypy7311: # py38+py39 | ||
docker: | ||
- image: pypy:3-7.3.11-slim | ||
resource_class: small | ||
pypy73: # py39+py310 | ||
docker: | ||
- image: pypy:3-7.3-slim | ||
resource_class: small | ||
|
||
jobs: | ||
toxpy: | ||
docker: | ||
- image: python:<<parameters.docker_image>>-alpine | ||
executor: <<parameters.executor>> | ||
parameters: | ||
cov_version: | ||
default: "" | ||
type: string | ||
docker_image: | ||
type: string | ||
# TODO: figure out `<<parameters.docker_image>>.replace('.','')` | ||
tox_environment: | ||
type: string | ||
executor: | ||
type: executor | ||
steps: | ||
- run: apk add --no-cache gcc git libffi-dev musl-dev openssh-client openssl-dev | ||
- checkout | ||
- run: pip install tox tox-factor | ||
- unless: | ||
condition: <<parameters.cov_version>> | ||
steps: | ||
- run: tox -f <<parameters.tox_environment>> | ||
- run: tox -e coveralls41 | ||
- when: | ||
condition: <<parameters.cov_version>> | ||
steps: | ||
- run: tox -f <<parameters.tox_environment>>-cov<<parameters.cov_version>> | ||
- run: tox -e coveralls<<parameters.cov_version>> | ||
- run: python3 -m pip install --upgrade tox | ||
- run: tox run -f <<parameters.executor>> | ||
- run: tox run -e upload | ||
|
||
toxpypy: | ||
docker: | ||
- image: pypy:<<parameters.docker_image>> | ||
executor: <<parameters.executor>> | ||
parameters: | ||
cov_version: | ||
type: string | ||
docker_image: | ||
type: string | ||
executor: | ||
type: executor | ||
steps: | ||
- checkout | ||
- run: pip install tox tox-factor | ||
- run: tox -f pypy3-cov<<parameters.cov_version>> | ||
- run: tox -e coveralls<<parameters.cov_version>> | ||
- run: python3 -m pip install --upgrade tox | ||
- run: tox run -f pypy3 | ||
- run: tox run -e upload | ||
|
||
workflows: | ||
lint: | ||
test: | ||
jobs: | ||
- linter/pre-commit: | ||
executor: python-minimum | ||
|
||
test-cpython: | ||
jobs: | ||
- toxpy: | ||
name: test-py3.6-cov<<matrix.cov_version>> | ||
docker_image: '3.6' | ||
tox_environment: py36 | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
executor: py36 | ||
- toxpy: | ||
name: test-py3.7-cov<<matrix.cov_version>> | ||
docker_image: '3.7' | ||
tox_environment: py37 | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
- toxpy: | ||
name: test-py3.8-cov<<matrix.cov_version>> | ||
docker_image: '3.8' | ||
tox_environment: py38 | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
- toxpy: | ||
name: test-py3.9-cov<<matrix.cov_version>> | ||
docker_image: '3.9' | ||
tox_environment: py39 | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
- toxpy: | ||
name: test-py3.10-cov<<matrix.cov_version>> | ||
docker_image: '3.10' | ||
tox_environment: py310 | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
|
||
test-pypy: | ||
jobs: | ||
- toxpypy: | ||
name: test-pypy<<matrix.docker_image>>-cov<<matrix.cov_version>> | ||
name: test-<<matrix.executor>> | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5'] | ||
docker_image: ['3-5', '3-6'] | ||
executor: [py36, py37, py38, py39, py310] | ||
- toxpypy: | ||
name: test-pypy3-7-cov<<matrix.cov_version>> | ||
docker_image: '3-7' | ||
name: test-<<matrix.executor>> | ||
matrix: | ||
parameters: | ||
cov_version: ['41', '5', '6'] | ||
executor: [pypy731, pypy735, pypy737, pypy7311, pypy73] |
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,55 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
tags: | ||
|
||
jobs: | ||
buildsdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Build sdist | ||
run: python setup.py sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./dist/*.tar.gz | ||
|
||
buildwheel: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- name: Build wheels | ||
run: python -m wheel . | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./dist/*.whl | ||
|
||
publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && github.ref_type == 'tag' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
- run: ls -la ./dist | ||
# TODO: enable me | ||
# - name: Publish package distributions to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 |
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,23 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# TODO: 3.6 not supported on latest | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade pip tox tox-gh-actions | ||
- run: tox | ||
- run: tox -e upload | ||
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