fix: backend/Dockerfile to reduce vulnerabilities #94
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: Continuous Integration | |
| on: [push] | |
| jobs: | |
| lint_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 1.5.1 | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: .venv | |
| key: venv-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: cd backend; poetry install --no-interaction | |
| - name: Linting | |
| run: make lint | |
| - name: Auditing | |
| run: make audit | |
| - name: Build Docker Image | |
| run: docker compose build | |
| - name: Tests | |
| run: make test |