Skip to content

make ci runs conditional --no-ci #23

make ci runs conditional --no-ci

make ci runs conditional --no-ci #23

Workflow file for this run

name: Lint and Tests
on: [push, pull_request]
jobs:
if: "!contains(github.event.head_commit.message, '--no-ci')"

Check failure on line 6 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
lint:
name: Run Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
poetry env use "3.11"
poetry export --only lint --output lint-requirements.txt
pip install -r lint-requirements.txt
- name: Run Ruff
run: ruff check --output-format=github .
test:
name: Run Tests
needs: lint
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports: ["5432:5432"]
redis:
image: redis:7.0.12-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: |
poetry env use "3.11"
poetry install
poetry run pytest -x -n auto --dist loadfile
env:
DB_HOST: "localhost"
REDIS_HOST: "localhost"
REDIS_PORT: "6379"