build: fix github workflow to user specific lock #26
Workflow file for this run
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
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
exclude: | |
- os: windows-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tkinter for Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y python3-tk | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Install PDM | |
run: python -m pip install pdm==2.17.2 | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Generate lock file (Linux and macOS) | |
if: matrix.os != 'windows-latest' | |
run: | | |
if [ "${{ matrix.python-version }}" == "3.8" ]; then | |
pdm lock --python="==3.8.*" --lockfile=pdm-py38.lock | |
else | |
pdm lock --python=">=3.9" --lockfile=pdm-py39+.lock | |
fi | |
shell: bash | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Generate lock file (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
if (${{ matrix.python-version }} -eq "3.8") { | |
pdm lock --python="==3.8.*" --lockfile=pdm-py38.lock | |
} else { | |
pdm lock --python=">=3.9" --lockfile=pdm-py39+.lock | |
} | |
shell: pwsh | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Install dependencies (Linux and macOS) | |
if: matrix.os != 'windows-latest' | |
run: | | |
if [ "${{ matrix.python-version }}" == "3.8" ]; then | |
pdm install --lockfile=pdm-py38.lock --without docs | |
else | |
pdm install --lockfile=pdm-py39+.lock --without docs | |
fi | |
shell: bash | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Install dependencies (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
if (${{ matrix.python-version }} -eq "3.8") { | |
pdm install --lockfile=pdm-py38.lock --without docs | |
} else { | |
pdm install --lockfile=pdm-py39+.lock --without docs | |
} | |
shell: pwsh | |
continue-on-error: true # Allow the workflow to proceed if this step fails | |
- name: Run tests | |
run: pdm run pytest | |
continue-on-error: true # Allow the workflow to proceed even if tests fail |