Add skipping integration tests on git pipeline #2
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: Python Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
env: | |
POETRY_HTTP_CONCURRENCY: 1 # Forces single-threaded downloads | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11.9' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry==1.8.5 | |
- name: Configure Poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Cache Poetry download cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-cache-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry-cache- | |
- name: Cache virtual environment | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-venv- | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Run tests | |
run: poetry run pytest --maxfail=1 --disable-warnings -v -m "not integration" |