Files
BastienandGitHub a67fd36c33 (ops) implement production docker images (#451)
* (ops) implement production docker images

Github workflows:
  - moved docker-publish jobs into a separate file on push main only
Backend:
  - added healthcheck on backend Dockerfile + minor fixes
  - bumped django to 5.1.15 to mitigate major CVE
  - moved /healthz endpoint to /__heartbeat__ + added db connection
    check
Frontend:
  - Added runtime-prod Dockerfile target + minor fixes on the Dockerfile
  - bump next to 15.5.9 to mitigate major CVE
  - moved nginx config to standard nginx container configuration
    template, fixed `scalingo_postfrontend` accordingly
Keycloak:
  - Added production Dockerfile
  - Removed scalingo_pgdump script & cron.json
socks-proxy:
  - added package upgrades run into runtime Dockerfile stage
Misc:
  - removed scalingo_pgdump.sh & cron.json
  - fixed compose and e2e nginx configs with /healthz replacement

* (fix) coderabbit recommandations
2026-01-12 15:18:25 +01:00

113 lines
2.8 KiB
YAML

name: Lint and tests
"on":
push:
branches:
- main
pull_request:
branches:
- '*'
env:
COMPOSE_BAKE: true
jobs:
lint-back:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Run linting checks
run: make back-lint
test-back:
runs-on: ubuntu-latest
env:
DOCKER_USER: 1001
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Setup data directories
run: |
mkdir -p data/media data/static
chown -R 1001:1001 data
- name: Collect static files
run: make collectstatic
- name: Create msg-imports bucket
run: make import-bucket
- name: Run backend tests
run: make back-test
test-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make front-install-frozen
- name: Run frontend tests
run: make front-test
test-e2e:
runs-on: ubuntu-latest
env:
DOCKER_USER: 1001
PW_TEST_HTML_REPORT_OPEN: 'never'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Run E2E tests only for Chromium browser to speed up the tests
run: make e2e-test-ci args="--project chromium"
lint-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make front-install-frozen
- name: Run frontend linting
run: make front-lint
- name: Run frontend check
run: make front-ts-check
build-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make front-install-frozen
- name: Build frontend
run: make front-build
check-api-state:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make front-install-frozen
- name: Run API update
run: make api-update
- name: Check for changes
run: |
git diff --quiet || \
(echo "API changes detected. Please run 'make api-update' then commit the changes." && exit 1)