mirror of
https://github.com/suitenumerique/messages.git
synced 2026-09-27 12:14:55 +02:00
The OpenAPI Schema does not embedded abilities property. We fix that and make two serializers for User model in order to get proper openapi definition for User instance with abilities and without abilities.
122 lines
2.9 KiB
YAML
122 lines
2.9 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
|
|
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
|
|
chmod -R 777 data
|
|
- name: Collect static files
|
|
run: make collectstatic
|
|
- 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
|
|
|
|
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)
|
|
|
|
docker-publish-mta-in:
|
|
uses: ./.github/workflows/docker-publish.yml
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
secrets: inherit
|
|
with:
|
|
image_name: "mta-in"
|
|
context: "src/mta-in"
|
|
target: runtime-prod
|
|
|
|
docker-publish-mta-out:
|
|
uses: ./.github/workflows/docker-publish.yml
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
secrets: inherit
|
|
with:
|
|
image_name: "mta-out"
|
|
context: "src/mta-out"
|
|
target: runtime-prod
|