PaiGram/.github/workflows/test.yml

45 lines
1.0 KiB
YAML
Raw Normal View History

2022-09-12 09:24:33 +00:00
name: test
2022-09-12 08:24:04 +00:00
on:
push:
2022-09-12 08:24:04 +00:00
branches:
- main
paths:
- 'tests/**'
pull_request:
types: [ opened, synchronize ]
paths:
- 'modules/apihelper/**'
- 'modules/wiki/**'
- 'tests/**'
schedule:
- cron: '0 4 * * 3'
2022-09-12 08:24:04 +00:00
jobs:
pytest:
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
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
2022-09-12 08:24:04 +00:00
with:
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