chore: Run CI tests under python3.12, too (#6) #23
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: Testing Plugin | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] | |
lektor-version: [latest, stable] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache PIP | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ matrix.python-version }}-${{ matrix.lektor-version }} | |
restore-keys: pip-${{ matrix.python-version }}- | |
- name: Install Lektor latest | |
if: matrix.lektor-version == 'latest' | |
run: pip install "lektor @ git+https://github.com/lektor/lektor.git" | |
- name: Install Lektor stable | |
if: matrix.lektor-version == 'stable' | |
run: pip install -U lektor | |
- name: Install Pytest | |
run: pip install -U pytest | |
- name: Run tests | |
run: pytest tests |