2022-09-12 09:24:33 +00:00
|
|
|
name: test
|
2022-09-12 08:24:04 +00:00
|
|
|
|
|
|
|
on:
|
2022-09-12 08:39:44 +00:00
|
|
|
push:
|
2022-09-12 08:24:04 +00:00
|
|
|
branches:
|
2022-09-12 08:39:44 +00:00
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- 'tests/**'
|
|
|
|
pull_request:
|
|
|
|
types: [ opened, synchronize ]
|
|
|
|
paths:
|
2022-09-12 15:20:17 +00:00
|
|
|
- 'modules/apihelper/**'
|
|
|
|
- 'modules/wiki/**'
|
2022-09-12 08:39:44 +00:00
|
|
|
- 'tests/**'
|
2022-09-12 16:12:39 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 4 * * 3'
|
2022-09-12 08:24:04 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pytest:
|
2022-09-15 02:22:40 +00:00
|
|
|
name: pytest
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version: [ '3.10' ]
|
|
|
|
os: [ ubuntu-latest, windows-latest ]
|
|
|
|
experimental: [ false ]
|
|
|
|
fail-fast: False
|
2022-09-12 08:24:04 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-09-15 02:22:40 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v4
|
2022-09-12 08:24:04 +00:00
|
|
|
with:
|
2022-09-15 02:22:40 +00:00
|
|
|
python-version: ${{ matrix.python-version }}
|
2022-09-12 09:24:33 +00:00
|
|
|
- name: Install poetry
|
2022-09-12 08:24:04 +00:00
|
|
|
run: |
|
|
|
|
pip install --upgrade poetry
|
2022-09-12 09:24:33 +00:00
|
|
|
poetry config virtualenvs.create false
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-09-12 08:24:04 +00:00
|
|
|
poetry install
|
|
|
|
poetry install --extras test
|
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2022-09-12 09:24:33 +00:00
|
|
|
python -m pytest
|