GitHub Actions: Remove the deprecated set-output
command (#72)
#32
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: Test | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Python >= 3.13 will fail with `ModuleNotFoundError: No module named 'lib2to3'` | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, macos-latest] # , windows-latest] # Windows tests will fail. | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: | |
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('**/tox.ini') }} | |
restore-keys: | | |
${{ matrix.os }}-${{ matrix.python-version }}-v1- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e . | |
python -m pip install -r tests/requirements.txt | |
- name: Test | |
run: | | |
pytest -vv |