Skip to content

Commit

Permalink
Merge pull request #173 from pwei1018/main
Browse files Browse the repository at this point in the history
Update backend CI.
  • Loading branch information
pwei1018 authored Aug 14, 2024
2 parents 21c5e9a + 426a1dc commit 958feb2
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: "[email protected]"
services:
postgres:
image: postgis/postgis:15-master
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 958feb2

Please sign in to comment.