mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
50de1f3555
默认测试运行程序从 `unittest` 改为 `pytest` Co-authored-by: xtaodada <xtao@xtaolink.cn> Co-authored-by: Karako <karakohear@gmail.com>
35 lines
744 B
YAML
35 lines
744 B
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'tests/**'
|
|
pull_request:
|
|
types: [ opened, synchronize ]
|
|
paths:
|
|
- 'modules/apihelper/**'
|
|
- 'modules/wiki/**'
|
|
- 'tests/**'
|
|
|
|
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 |