Spaces:
Running
Running
name: Starfish testing workflow | |
on: | |
# push: | |
# branches: | |
# - main | |
# - dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
- '!f/pypi_release' | |
jobs: | |
test-integration: | |
if: github.event.pull_request.head.ref != 'f/pypi_release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Load cached Poetry installation | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Load cached venv | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Set Locale | |
run: | | |
sudo locale-gen "en_US.UTF-8" | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export TELEMETRY_ENABLED=false | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
poetry install --with dev | |
# - name: Run ruff | |
# run: | | |
# poetry run ruff check . --output-format=github | |
# poetry run ruff format . --check | |
# --cov-report=html | |
- name: Run tests with coverage | |
run: | | |
poetry run pytest --cov='src' --cov-fail-under=20 tests/ | |