chore: fix CI #834
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: CI | |
on: | |
schedule: | |
- cron: "42 6 * * *" | |
push: | |
branches: [develop] | |
paths: | |
- "aiotieba/**" | |
- "thirdparty/**" | |
- "tests/**" | |
- ".github/workflows/CI*" | |
pull_request: | |
branches: [develop] | |
paths: | |
- "aiotieba/**" | |
- "thirdparty/**" | |
- "tests/**" | |
- ".github/workflows/CI*" | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
environment: develop | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.12"] | |
steps: | |
- name: Checkout develop | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip -V | |
pip install --user pdm | |
pdm install -G test -q | |
- name: Prepare config | |
run: gpg --quiet --batch --yes --decrypt --passphrase=${{ secrets.PASSPHRASE }} --output aiotieba.toml tests/aiotieba.toml.gpg | |
- name: Run tests | |
run: pdm run pytest tests |