PaiGram/.github/workflows/test.yml
洛水居室 26c20fd921
🎨 添加 CI 定时任务
每周星期三12:00(UTC+8)执行
2022-09-13 00:25:11 +08:00

37 lines
780 B
YAML

name: test
on:
push:
branches:
- main
paths:
- 'tests/**'
pull_request:
types: [ opened, synchronize ]
paths:
- 'modules/apihelper/**'
- 'modules/wiki/**'
- 'tests/**'
schedule:
- cron: '0 4 * * 3'
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install poetry
run: |
pip install --upgrade poetry
poetry config virtualenvs.create false
- name: Install dependencies
run: |
poetry install
poetry install --extras test
- name: Test with pytest
run: |
python -m pytest