Introduce workflow run crate #348
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pytest | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "sapporo/**" | |
- "tests/**" | |
- "setup.py" | |
workflow_dispatch: {} | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
pytest: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install jq | |
run: | | |
sudo apt update | |
sudo apt install -y jq | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --no-cache-dir --progress-bar off -U pip setuptools wheel | |
python3 -m pip install --no-cache-dir --progress-bar off -U .[tests] | |
- name: Check with pytest on flask-server | |
run: | | |
TEST_SERVER_MODE=flask pytest -s ./tests/unit_test | |
- name: Check with pytest on uwsgi-server | |
run: | | |
TEST_SERVER_MODE=uwsgi pytest -s ./tests/unit_test |