feat: ✨ implementation ocr module for blank guns #481
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: Main CI | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
pre-commit-check: | |
name: Check pre-commit hooks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Pre-commit | |
run: pip install pre-commit | |
- name: Install Prettier | |
working-directory: frontend | |
run: | | |
npm ci | |
npm run format-check | |
- run: pre-commit run --all-files | |
build-backend: | |
name: Build Backend | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/dnum-mi/basegun/basegun-backend | |
context: ./backend | |
build-frontend: | |
name: Build Frontend | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/dnum-mi/basegun/basegun-frontend | |
context: ./frontend | |
test-backend: | |
name: Test Backend | |
needs: build-backend | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start stack using docker compose | |
run: IMAGE_TAG=${{ needs.build-backend.outputs.image_tag }} docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d | |
- run: docker compose exec backend coverage run -m pytest | |
- run: docker compose exec backend coverage xml --ignore-errors | |
- name: Produce the coverage report | |
uses: insightsengineering/coverage-action@v2 | |
with: | |
path: ./backend/coverage.xml | |
publish: true | |
threshold: 80 | |
test-frontend-format: | |
name: Test Frontend Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Prettier check | |
working-directory: frontend | |
run: | | |
npm ci | |
npm run format-check | |
test-e2e: | |
name: Run E2E tests | |
needs: [build-backend, build-frontend] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Start stack using docker compose | |
run: IMAGE_TAG=${{ needs.build-backend.outputs.image_tag }} docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: ./frontend | |
build: npm run build | |
start: npm run start | |
command: npm run test:e2e-ci | |
- name: Send artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: cypress-screenshots | |
path: | | |
./frontend/cypress/screenshots/ |