ci(docs): Enable #146
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 workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python building | |
on: | |
push: | |
branches: [ "async_dev" ] | |
pull_request: | |
branches: [ "async_dev" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
- name: Install dependencies | |
run: | | |
pdm install -d | |
#- name: Run pyright | |
# uses: jakebailey/pyright-action@v1 | |
- name: Run mypy | |
run: | | |
source .venv/bin/activate | |
mypy . | |
- name: Run ruff | |
run: | | |
source .venv/bin/activate | |
ruff check . --output-format=full --show-fixes --ignore FIX | |
- name: Run unittest | |
run: | | |
source .venv/bin/activate | |
python -m unittest | |
- name: Build package | |
if: ${{ always() }} | |
id: build | |
run: | | |
pdm build | |
echo "exit_code=$?" >> $GITHUB_OUTPUT | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} # steps.build.outputs.exit_code == 0 | |
with: | |
name: 'dist' | |
path: dist/* |