diff --git a/.github/workflows/code-quality-check.yml b/.github/workflows/code-quality-check.yml new file mode 100644 index 0000000..d5939d2 --- /dev/null +++ b/.github/workflows/code-quality-check.yml @@ -0,0 +1,43 @@ +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/ + + +