diff --git a/.github/workflows/backend-coverage.yaml b/.github/workflows/backend-coverage.yaml index fd19cc460..8b0f07307 100644 --- a/.github/workflows/backend-coverage.yaml +++ b/.github/workflows/backend-coverage.yaml @@ -15,16 +15,6 @@ jobs: env: working-directory: ./backend - services: - postgres: - image: postgres:14.1 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} - POSTGRES_DB: postgres - ports: ["5432:5432"] - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - strategy: max-parallel: 4 matrix: @@ -46,12 +36,7 @@ jobs: working-directory: ${{env.working-directory}} run: | touch .env - echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env echo DJANGO_DEBUG='True' >> .env - echo POSTGRES_NAME=postgres >> .env - echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env - echo DB_HOST=localhost >> .env echo EMAIL_HOST=localhost >> .env echo EMAIL_PORT=1025 >> .env echo EMAIL_HOST_USER='' >> .env @@ -67,13 +52,9 @@ jobs: python manage.py migrate - name: Run coverage working-directory: ${{env.working-directory}} - env: - DATABASE_URL: "postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres" run: | export $(grep -v '^#' .env | xargs) find . -path '*/tests/*' -and -name 'test*.py' -and -not -path "./venv/*" | xargs coverage run -m pytest - name: Display coverage report working-directory: ${{env.working-directory}} - env: - DATABASE_URL: "postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres" run: coverage report diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 801ac6a7b..b3724f259 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -16,22 +16,6 @@ jobs: backend-directory: ./backend working-directory: ./frontend - services: - postgres: - image: postgres:14.1 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} - POSTGRES_DB: postgres - ports: ["5432:5432"] - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - mailhog: - image: mailhog/mailhog - ports: [ - "1025:1025", - "8025:8025" - ] - strategy: max-parallel: 4 matrix: @@ -68,13 +52,8 @@ jobs: working-directory: ${{ env.backend-directory }} run: | touch .env - echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env echo DJANGO_SUPERUSER_EMAIL=admin@tests.com >> .env echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env - echo POSTGRES_NAME=postgres >> .env - echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env - echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env echo DEFAULT_FROM_EMAIL='ciso-assistant@tests.net' >> .env diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 6d5b84a57..ff3f295a0 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -13,16 +13,6 @@ jobs: startup-functional-test: runs-on: ubuntu-20.04 - services: - postgres: - image: postgres:14.1 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: ["5432:5432"] - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - strategy: max-parallel: 4 matrix: @@ -60,13 +50,8 @@ jobs: working-directory: ${{ env.backend-directory }} run: | touch .env - echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env echo DJANGO_SUPERUSER_EMAIL=admin@tests.com >> .env echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env - echo POSTGRES_NAME=postgres >> .env - echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=postgres >> .env - echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env - name: Run migrations @@ -114,7 +99,6 @@ jobs: working-directory: ${{ env.backend-directory }} run: | touch .env - echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env export $(grep -v '^#' .env | xargs) - name: Config the Docker app run: |