Skip to content

chore(ci): Bump actions/checkout from 4 to 6 #2

chore(ci): Bump actions/checkout from 4 to 6

chore(ci): Bump actions/checkout from 4 to 6 #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-unit:
name: Lint + unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruff
- name: Ruff check
run: ruff check .
- name: Ruff format check
run: ruff format --check .
- name: Run unit tests
run: pytest tests/ --ignore=tests/integration -v
integration:
name: Fast integration tests
runs-on: ubuntu-latest
needs: lint-and-unit
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements.txt
- name: Start Redis
run: |
docker run -d --name redis -p 6379:6379 redis:7-alpine
- name: Start NATS with JetStream
run: |
docker run -d --name nats -p 4222:4222 -p 8222:8222 \
nats:2-alpine --jetstream --http_port 8222
- name: Wait for services to become healthy
run: |
for i in $(seq 1 30); do
if docker exec redis redis-cli ping 2>/dev/null | grep -q PONG \
&& curl -sf http://localhost:8222/healthz > /dev/null 2>&1; then
echo "Services ready"
exit 0
fi
sleep 1
done
echo "Services failed to become ready within 30 seconds"
docker logs redis || true
docker logs nats || true
exit 1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run fast integration tests
run: pytest tests/integration/ -m "not slow" -v
- name: Dump service logs on failure
if: failure()
run: |
echo "=== Redis logs ==="
docker logs redis || true
echo "=== NATS logs ==="
docker logs nats || true