feat: post submit page #123
Workflow file for this run
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: Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
# JOB to run change detection | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
backend: ${{ steps.filter.outputs.backend }} | |
frontend: ${{ steps.filter.outputs.frontend }} | |
steps: | |
# https://github.com/dorny/paths-filter/issues/212#issuecomment-1960976719 | |
- uses: actions/checkout@v4 | |
# For pull requests it's not necessary to checkout the code | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
backend: | |
- 'backend/**' | |
frontend: | |
- 'frontend/**' | |
# JOB to link backend code | |
backend: | |
needs: changes | |
if: ${{ needs.changes.outputs.backend == 'true' }} | |
defaults: | |
run: | |
working-directory: ./backend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
virtualenvs-path: .venv | |
installer-parallel: true | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
- name: Run isort and flake8 | |
run: poetry run poe lint | |
# JOB to link backend code | |
frontend: | |
needs: changes | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
defaults: | |
run: | |
working-directory: ./frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache-dependency-path: ./frontend/package-lock.json | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run eslint | |
run: npm run lint |