Problems with the CI. Trying to fix #70
This file contains hidden or 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 | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Cache PDM packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pdm | |
| key: ${{ runner.os }}-pdm-${{ hashFiles('**/pdm.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pdm- | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip --user | |
| - name: Install and configure PDM | |
| run: | | |
| python -m pip install --user pdm | |
| pdm config python.use_venv false | |
| - name: Install dependencies | |
| run: | | |
| pdm install -G test | |
| pdm install -G example | |
| - name: Run tests | |
| run: pdm run pytest | |
| - name: Run benchmark | |
| working-directory: benchmark | |
| run: pdm run python main.py |