Files
lasuite-messages/.github/workflows/messages.yml
T
Sylvain Zimmerandjbpenrath f4d235825f ⚡️(devx) improve "make bootstrap" setup time and overall DevX
Notably, we try to reduce disk usage by standardizind on common
base Docker images. We also improve node_modules by reducing
duplicate dependencies and install speed.
2026-07-22 11:34:27 +02:00

159 lines
4.2 KiB
YAML

name: Lint and tests
"on":
push:
branches:
- main
pull_request:
branches:
- '*'
# Default to least-privilege at the workflow scope. Jobs that need
# more (e.g. opening / editing comments) opt in explicitly.
permissions:
contents: read
env:
COMPOSE_BAKE: true
jobs:
lint-back:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Run linting checks
run: make lint-back
typecheck-jmap-email:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Run pyright (strict) on the jmap-email library
run: make typecheck-jmap-email
test-back:
runs-on: ubuntu-latest
env:
DOCKER_USER: 1001
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Setup data directories
run: |
mkdir -p data/static
chown -R 1001:1001 data
- name: Collect static files
run: make collectstatic
- name: Create object storage buckets
run: make create-buckets
- name: Run backend tests
run: make test-back-parallel
test-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make install-frozen-front
- name: Run frontend tests
run: make test-front
test-e2e:
runs-on: ubuntu-latest
env:
DOCKER_USER: 1001
PW_TEST_HTML_REPORT_OPEN: 'never'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Run E2E tests only for Chromium browser to speed up the tests
run: make test-e2e-ci args="--project chromium"
test-mta-in:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Create env files
run: make create-env-files
- name: Run mta-in (Postfix milter) tests
run: make test-mta-in
test-mta-in-py:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Create env files
run: make create-env-files
- name: Run mta-in pymta (aiosmtpd) tests
run: make test-mta-in-py
# NOTE: no test-mta-out job — the mta-out suite is an integration test that
# needs a live Postfix + SASL relay (its entrypoint runs `saslpasswd2`, which
# fails in the ephemeral CI container: "saslpasswd2: generic failure"). It
# stays a local/manual target (`make test-mta-out`) until it can be run
# hermetically.
lint-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make install-frozen-front
- name: Run frontend linting
run: make lint-front
- name: Run frontend check
run: make typecheck-front
build-front:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make install-frozen-front
- name: Build frontend
run: make build-front
check-api-state:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create env files
run: make create-env-files
- name: Install frontend dependencies
run: make install-frozen-front
- 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)