chore(build): Add _version.py to .gitignore, fix build #125
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 --no-self | |
- name: Upload log | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDM error log | |
path: /tmp/pdm-install-*.log | |
#- name: Run pyright | |
# uses: jakebailey/pyright-action@v1 | |
# with: | |
# version: "1.1.308" | |
- name: Run mypy | |
run: | | |
source .venv/bin/activate | |
mypy . | |
- name: Run ruff | |
run: | | |
source .venv/bin/activate | |
ruff check . --show-source --show-fixes --ignore FIX | |
- 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/* |