Bump actions/checkout from 3 to 4 #20
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
name: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [ '3.10', '3.11', '3.12' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: true | |
- name: Install dependencies | |
run: | | |
sudo apt update && sudo apt install --yes libgl1-mesa-dev | |
pdm lock | |
pdm install --dev | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV | |
- name: Debug directory structure and PYTHONPATH | |
run: | | |
pwd | |
echo $PYTHONPATH | |
tree src/ | |
- name: Test with pytest | |
run: | | |
pdm run make test-cicd | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4.0.2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: sysid/prepembd | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: [ '3.10', '3.11', '3.12' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: true | |
- name: Install dependencies | |
run: | | |
pdm lock | |
pdm install --dev | |
# - name: mypy | |
# run: | | |
# pdm run mypy --python-version=${{ matrix.python }} src/ | |
- name: lint | |
run: | | |
pdm run make lint | |
- name: format | |
run: | | |
pdm run make format-check | |
- name: isort | |
run: | | |
pdm run isort . --check --diff |