Build Aptograph open-source career platform #3
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| python -m pip install -r platform/api/requirements.txt | |
| python -m pip install -e '.[lint]' | |
| python -m pip install pytest pytest-cov | |
| - name: Lint | |
| run: ruff check app tests platform/api/careerproof_api platform/api/tests streamlit_app.py | |
| - name: Compile | |
| run: python -m compileall -q app platform/api/careerproof_api streamlit_app.py | |
| - name: Test | |
| env: | |
| PYTHONPATH: .:platform/api | |
| run: pytest tests platform/api/tests --cov=app --cov=careerproof_api --cov-report=term-missing | |
| web: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: platform/web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: platform/web/package-lock.json | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm run test | |
| - run: npm audit --omit=dev |