fix(deps): update dependency python-multipart to ^0.0.18 [security] #809
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: CI Pipeline | |
on: push | |
env: | |
test_pg_user: postgres | |
test_pg_password: postgres | |
test_pg_db: cnlearn_testing | |
app_name: "CNLearn Testing" | |
app_version: "0.0.5" | |
server_name: TestingServer | |
server: localhost | |
server_host: http://127.0.0.1:8000 | |
pg_port: 5432 | |
environment: "Testing" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: ${{ env.test_pg_user }} | |
POSTGRES_PASSWORD: ${{ env.test_pg_user }} | |
POSTGRES_DB: ${{ env.test_pg_db }} | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Run ruff for linting | |
run: poetry run ruff check . | |
- name: Run black --check . | |
run: poetry run black --check . | |
- name: Run mypy | |
run: poetry run mypy . | |
- name: Test with pytest | |
env: | |
APP_NAME: ${{ env.app_name }} | |
VERSION: ${{ env.app_version }} | |
SERVER_NAME: ${{ env.server_name }} | |
SERVER_HOST: ${{ env.server_host }} | |
CNLEARN_POSTGRES_SERVER: ${{ env.server }} | |
CNLEARN_POSTGRES_PORT: ${{ env.pg_port }} | |
CNLEARN_POSTGRES_USER: ${{ env.test_pg_user }} | |
CNLEARN_POSTGRES_PASSWORD: ${{ env.test_pg_password }} | |
CNLEARN_POSTGRES_DB: ${{ env.test_pg_db }} | |
ENVIRONMENT: ${{ env.environment }} | |
run: | | |
poetry run pytest -s | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@master | |
with: | |
path-to-lcov: "./cov.info" | |
github-token: ${{ secrets.GITHUB_TOKEN }} |