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: Code Quality Check | |
| on: | |
| pull_request: | |
| branches: [ main, dev ] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python for Backend | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '3.9' | |
| - name: Install Backend Dependencies | |
| run: pip install -r backend/requirements.txt | |
| - name: Run Backend Linting | |
| run: flake8 backend/ | |
| - name: Set up Node.js for Frontend | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install Frontend Dependencies | |
| run: npm install --prefix frontend/ | |
| - name: Run Frontend Linting | |
| run: npm run lint --prefix frontend/ | |
| - name: Run Backend Tests | |
| run: pytest backend/tests/ | |
| - name: Run Frontend Tests | |
| run: npm test --prefix frontend/ | |