User can give marketing consent to a specific course #2828
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
- canary | |
pull_request: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
headless_lms: | |
runs-on: ubuntu-latest | |
container: eu.gcr.io/moocfi-public/project-331-headless-lms-dev-base:latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo clippy | |
run: cargo clippy --manifest-path services/headless-lms/Cargo.toml -- -D warnings | |
- name: Build | |
run: cargo build --verbose | |
working-directory: ./services/headless-lms | |
- name: Set up unit test database | |
run: sqlx database setup | |
working-directory: ./services/headless-lms | |
env: | |
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_test | |
- name: Set up integration test database | |
run: sqlx database setup | |
working-directory: ./services/headless-lms | |
env: | |
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_integration | |
- name: Run tests | |
run: cargo test --verbose | |
working-directory: ./services/headless-lms | |
env: | |
DATABASE_URL: postgres://postgres:postgres@postgres/headless_lms_test | |
DATABASE_URL_TEST: postgres://postgres:postgres@postgres/headless_lms_integration | |
REDIS_URL: redis://redis:6379 | |
cms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: npm ci for the root of the repo | |
run: npm ci | |
- name: npm ci | |
run: npm ci | |
working-directory: ./services/cms | |
- name: Run tests | |
run: npm run test | |
working-directory: ./services/cms | |
shared-module-common: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: npm ci for the root of the repo | |
run: npm ci | |
- name: npm ci | |
run: npm ci | |
working-directory: ./shared-module/packages/common | |
- name: Run tests | |
run: npm run test | |
working-directory: ./shared-module/packages/common | |
quizzes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: npm ci for the root of the repo | |
run: npm ci | |
- name: npm ci | |
run: npm ci | |
working-directory: ./services/quizzes | |
- name: Run tests | |
run: npm run test | |
working-directory: ./services/quizzes | |
course-material: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: npm ci for the root of the repo | |
run: npm ci | |
- name: npm ci | |
run: npm ci | |
working-directory: ./services/course-material | |
- name: Run tests | |
run: npm run test | |
working-directory: ./services/course-material |