1.3.0 #105
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
# Build, test, and run static analyses, and send reports to external services | |
# Runs only on pushing to main | |
name: Build & test | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
max-parallel: 1 | |
matrix: | |
python-version: | |
- "3.10" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install build meta-dependencies | |
run: | | |
pip install poetry tox tox-gh-actions | |
- name: Test with tox | |
run: | | |
tox | |
- name: Update coveralls | |
run: | | |
pip install coveralls coverage[toml] | |
coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- uses: codecov/codecov-action@v1 | |
with: | |
verbose: true # optional (default = false) | |
release: | |
needs: build | |
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Setup Git | |
run: | | |
git config --global user.name "semantic-release" | |
git config --global user.email "semantic-release@GitHub" | |
- name: Python Semantic Release | |
uses: relekang/[email protected] | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |