diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index 4c542b85..c88b392b 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -33,7 +33,9 @@ jobs: cache: poetry cache-dependency-path: ${{ inputs.working_directory }}/poetry.lock - name: Install dependencies - run: poetry install + run: | + poetry update + poetry install - name: Run isort run: | poetry run isort . --check @@ -62,6 +64,26 @@ jobs: DATABASE_TEST_NAME: "postgres" DATABASE_TEST_HOST: "localhost" DATABASE_TEST_PORT: "5432" + FLASK_ENV: "testing" + DATABASE_TEST_URL: "postgresql://postgres:postgres@localhost:5432/postgres" + JWT_OIDC_TEST_ISSUER: "http://localhost:8081/auth/realms/demo" + JWT_OIDC_TEST_WELL_KNOWN_CONFIG: "http://localhost:8081/auth/realms/demo/.well-known/openid-configuration" + JWT_OIDC_TEST_ALGORITHMS: "RS256" + JWT_OIDC_TEST_AUDIENCE: "sbc-auth-web" + JWT_OIDC_TEST_CLIENT_SECRET: "1111111111" + JWT_OIDC_TEST_JWKS_CACHE_TIMEOUT: "6000" + KEYCLOAK_TEST_ADMIN_CLIENTID: "sbc-auth-admin" + KEYCLOAK_TEST_ADMIN_SECRET: "2222222222" + KEYCLOAK_TEST_AUTH_AUDIENCE: "sbc-auth-web" + KEYCLOAK_TEST_AUTH_CLIENT_SECRET: "1111111111" + KEYCLOAK_TEST_BASE_URL: "http://localhost:8081" + KEYCLOAK_TEST_REALMNAME: "demo" + TOKEN_EXPIRY_PERIOD: 7 + EMAIL_SECURITY_PASSWORD_SALT: "my_pwd_salt" + EMAIL_TOKEN_SECRET_KEY: "mySecretKey" + USE_TEST_KEYCLOAK_DOCKER: "YES" + USE_DOCKER_MOCK: "YES" + STAFF_ADMIN_EMAIL: "test@test.com" services: postgres: image: postgis/postgis:15-master @@ -76,6 +98,11 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + - name: Install docker-compose + run: | + sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + docker-compose version - name: Install Poetry run: | pipx install poetry @@ -86,7 +113,9 @@ jobs: cache: poetry cache-dependency-path: ${{ inputs.working_directory }}/poetry.lock - name: Install dependencies - run: poetry install + run: | + poetry update + poetry install - name: Run tests run: | poetry run pytest