Remove disussion model code #4375
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: Automated Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
types: [opened, reopened, synchronize] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 45 | |
services: | |
postgres: | |
image: postgres:16.3-alpine | |
env: | |
POSTGRES_DB: researchhub | |
POSTGRES_USER: rh_developer | |
POSTGRES_PASSWORD: not_secure | |
DB_PORT: 5432 | |
DB_HOST: localhost | |
DB_USER: rh_developer | |
DB_PASS: not_secure | |
APP_ENV: test | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis:6.2-alpine | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Check out sources | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'poetry' | |
- name: Install Dependencies | |
working-directory: ./src | |
run: | | |
poetry install | |
- name: Run Tests | |
working-directory: ./src | |
run: | | |
cp config/ci/* config | |
poetry run python manage.py migrate | |
poetry run python manage.py collectstatic --noinput | |
poetry run coverage run manage.py test --verbosity=2 | |
poetry run coverage xml -o coverage.xml | |
- name: Upload Coverage Report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./src/coverage.xml |