Simple uv and ruff setup #1825
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Codegen | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release/*' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'main' | |
- 'release/*' | |
jobs: | |
docker: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Backend no push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./backend/Dockerfile | |
platforms: linux/amd64 | |
push: false | |
tags: github-action | |
- name: Start containers | |
run: docker compose -f "docker-compose.yml" up -d --build | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
working-directory: frontend | |
run: npm install | |
- name: Run Codegen | |
working-directory: frontend | |
run: npm run codegen:v2:test | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v14 | |
id: verify-changed-files | |
with: | |
files: frontend/src/openapi | |
- name: Perform action when openapi file changes | |
if: contains(steps.verify-changed-files.outputs.changed_files, 'frontend/src/openapi') | |
run: | | |
echo "Codegen is out of sync" | |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}" | |
exit 1 | |
- name: Stop containers | |
if: always() | |
run: docker compose -f "docker-compose.yml" down |