v1.10.0 #65
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/CD | |
on: [push, pull_request] | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}" | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pdm-project/[email protected] | |
name: Setup Python and PDM | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
version: 2.9 | |
- name: Install dependencies | |
run: | | |
pdm sync -v -dG dev -dG test --no-self | |
- name: Tests | |
run: pdm run pytest tests -o log_cli=true -o log_cli_level=DEBUG | |
publish: | |
needs: tests | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pdm-project/[email protected] | |
name: Setup Python and PDM | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
version: 2.9 | |
- name: Publish | |
run: | | |
pdm publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |