PamGram/.github/workflows/test.yml

45 lines
1.1 KiB
YAML
Raw Normal View History

name: Test modules
2022-09-12 08:24:04 +00:00
on:
push:
2022-09-12 08:24:04 +00:00
branches:
- main
paths:
- 'tests/unit/**'
pull_request:
types: [ opened, synchronize ]
paths:
- 'modules/apihelper/**'
- 'modules/wiki/**'
- 'tests/unit/**'
2022-09-12 08:24:04 +00:00
jobs:
pytest:
name: pytest
runs-on: ${{matrix.os}}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
fail-fast: False
2022-09-12 08:24:04 +00:00
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v2
2022-09-12 08:24:04 +00:00
with:
python-version: 3.11
2022-10-08 16:12:31 +00:00
- name: restore or create a python virtualenv
id: cache
uses: syphar/restore-virtualenv@v1.2
- name: Create venv
if: steps.cache.outputs.cache-hit != 'true'
2022-09-12 08:24:04 +00:00
run: |
pip install --upgrade poetry
2023-02-28 14:15:48 +00:00
pip install git+https://github.com/pypa/installer.git
2022-09-12 09:24:33 +00:00
poetry config virtualenvs.create false
2022-09-12 08:24:04 +00:00
poetry install
poetry install --extras test
- name: Test with pytest
run: |
python -m pytest tests/unit