Skip to content

Fix secret removal which was also removing carriage returns and not supporting multiple URLs in single string #181

Fix secret removal which was also removing carriage returns and not supporting multiple URLs in single string

Fix secret removal which was also removing carriage returns and not supporting multiple URLs in single string #181

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
unit-tests:
runs-on: ubuntu-22.04
env:
POSTGRES_URI: nodb
steps:
- name: Retrieve source code
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dispatcher/backend/requirements.txt
pip install pytest
- name: Test with pytest
run: |
cd dispatcher/backend/src
PYTHONPATH=$PWD pytest tests/unit
integration-tests:
runs-on: ubuntu-22.04
services:
postgresdb:
image: postgres:15.2-bullseye
env:
POSTGRES_DB: zimtest
POSTGRES_PASSWORD: zimpass
POSTGRES_PORT: 5432
POSTGRES_USER: zimfarm
ports:
- 5432:5432
env:
POSTGRES_URI: postgresql+psycopg://zimfarm:zimpass@localhost:5432/zimtest
steps:
- name: Retrieve source code
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dispatcher/backend/requirements.txt
pip install -U pytest pytest-cov
- name: prepare Postgresql DB
run: |
cd $GITHUB_WORKSPACE/dispatcher/backend/src
PYTHONPATH=$PWD alembic upgrade head
- name: run tests
run: |
cd $GITHUB_WORKSPACE/dispatcher/backend/src
PYTHONPATH=$PWD pytest tests/ --cov=./
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}