Skip to content

ci: update release task #122

ci: update release task

ci: update release task #122

Workflow file for this run

name: ci
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
toxenv: [ "" ]
experimental: [ false ]
chrome: [ "stable" ]
include:
- toxenv: qa
python-version: 3.8
experimental: false
os: ubuntu-20.04
- toxenv: type
python-version: 3.8
experimental: false
os: ubuntu-20.04
- toxenv: splinter-linux
experimental: false
python-version: 3.8
os: ubuntu-20.04
- toxenv: splinter-windows
# Do not support selenium-windows
experimental: true
python-version: 3.8
os: windows-latest
# chrome: "959905"
- experimental: false
python-version: "3.9"
os: windows-latest
- experimental: true
python-version: "3.14.0-alpha - 3.14"
os: ubuntu-20.04
- experimental: true
python-version: "pypy-3.7"
os: ubuntu-20.04
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} python ${{ matrix.python-version }} ${{ matrix.toxenv }}"
continue-on-error: ${{ matrix.experimental }}
env:
TOXENV: ${{ matrix.toxenv }}
steps:
# chrome headless
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: ${{ matrix.chrome }}
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox codecov
- name: Run tests
run: tox
- name: Upload coverage to codecov
uses: codecov/codecov-action@v1
with:
env_vars: OS,PYTHON,TOXENV
publish:
name: Build and publish Python distributions to PyPI and TestPyPI
needs:
- test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution to Test PyPI
if: github.ref == 'refs/heads/master' && env.TEST_PYPI_API_TOKEN != null
uses: pypa/gh-action-pypi-publish@v1
with:
skip_existing: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1
with:
skip_existing: true
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ !github.event.schedule && startsWith(github.ref, 'refs/tags') }}
with:
draft: false
generate_release_notes: true
files: |
dist/*.whl