Prepare for a 0.0.1
(#2)
#1
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
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref | github.run_id }} | ||
Check failure on line 10 in .github/workflows/ci.yaml GitHub Actions / CIInvalid workflow file
|
||
cancel-in-progress: true | ||
jobs: | ||
test: | ||
name: Test ${{ matrix.py }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
py: | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup python for tox | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- run: python -m pip install tox | ||
- uses: actions/checkout@v4 | ||
- name: Setup python for test ${{ matrix.py }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Pick environment to test | ||
shell: python | ||
run: | | ||
import codecs; import os; import sys | ||
env = "TOXENV=py{}{}\n".format(*sys.version_info[:2]) | ||
print(f"Picked:\n{env}for{sys.version}") | ||
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: | ||
file_handler.write(env) | ||
- name: Setup test suite | ||
run: tox -vv --notest | ||
- name: Run test suite | ||
run: tox --skip-pkg-install | ||
static-typing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- run: python -m pip install tox | ||
- name: Run mypy | ||
run: tox -e mypy | ||
lint: | ||
name: Lint | ||
uses: less-action/reusables/.github/workflows/pre-commit.yaml@main | ||
with: | ||
python-version: "3.12" | ||
check-build: | ||
name: Check packaging | ||
uses: less-action/reusables/.github/workflows/python-test-build.yaml@main |