Skip to content

Is it Really Screaming Frog #76

Is it Really Screaming Frog

Is it Really Screaming Frog #76

Workflow file for this run

name: CI
on:
push:
branches: [ master]
pull_request:
jobs:
python:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: profiling
POSTGRES_PASSWORD: profiling
POSTGRES_DB: website_profiling
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U profiling -d website_profiling"
--health-interval 5s
--health-timeout 3s
--health-retries 5
env:
DATABASE_URL: postgres://profiling:profiling@localhost:5432/website_profiling
WEBSITE_PROFILING_ROOT: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Apply migrations
run: alembic upgrade head
- name: Pytest (core, 100% coverage)
run: pytest tests/ -q -m "not browser"
- name: Pytest (reporting coverage gate)
run: |
pytest tests/reporting/ \
--cov=website_profiling.reporting --cov-config=.coveragerc.reporting \
--cov-report=term-missing --cov-fail-under=100 -q -o addopts=
- name: Pytest (tools coverage gate)
run: |
pytest tests/tools/ \
--cov=website_profiling.tools --cov-config=.coveragerc.tools \
--cov-report=term-missing --cov-fail-under=100 -q -o addopts=
- name: CLI smoke
run: python -m src --help
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t website-profiling:ci .
- name: Browser crawl tests in image
run: |
docker run --rm \
website-profiling:ci \
/opt/venv/bin/pytest tests/test_crawl_fetchers.py tests/test_crawler_browser_e2e.py -m browser -q -o addopts=
- name: Compose smoke (postgres + web)
env:
WEB_IMAGE: website-profiling:ci
run: |
docker compose -f docker-compose.pull.yml up -d --wait
curl -fsS http://127.0.0.1:3000/home
docker compose -f docker-compose.pull.yml down -v
web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Test
run: npm test