Skip to content

chore(deps): pin dependencies #17865

chore(deps): pin dependencies

chore(deps): pin dependencies #17865

Workflow file for this run

name: CI
on: [push]
jobs:
python-tests:
runs-on: ubuntu-22.04
services:
db:
image: postgres:18.3@sha256:7e32e9833a6fb1c92c32552794cb6ed569d51b445a54907d35fc112ef39684db
# Health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres # pragma: allowlist secret
POSTGRES_DB: postgres
ports:
- 5432:5432
redis:
image: redis:8.6.3@sha256:4d25e2fe601f7ffaeb4437cb6ced3518bc36edf34ebe98863c80836943d94529
ports:
- 6379:6379
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Apt update
run: sudo apt-get update -y
- name: Apt install
run: cat Aptfile | sudo xargs apt-get install
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install Python
run: uv python install 3.13
- name: Install dependencies
run: uv sync --locked
- name: Running Celery
run: |
celery -A mitxpro worker -B -l INFO &
sleep 10
env:
CELERY_TASK_ALWAYS_EAGER: "True"
CELERY_BROKER_URL: redis://localhost:6379/4
CELERY_RESULT_BACKEND: redis://localhost:6379/4
SECRET_KEY: local_unsafe_key # pragma: allowlist secret
MITOL_HUBSPOT_API_PRIVATE_TOKEN: test-token
MITXPRO_BASE_URL: http://localhost:8053
MAILGUN_SENDER_DOMAIN: other.fake.site
MAILGUN_KEY: fake_mailgun_key
MITXPRO_ADMIN_EMAIL: example@localhost
OPENEDX_API_CLIENT_ID: fake_client_id
OPENEDX_API_CLIENT_SECRET: fake_client_secret # pragma: allowlist secret
- name: Tests
run: |
export MEDIA_ROOT="$(mktemp -d)"
uv run ./scripts/test/python_tests.sh
env:
DEBUG: False
NODE_ENV: "production"
CELERY_TASK_ALWAYS_EAGER: "True"
CELERY_BROKER_URL: redis://localhost:6379/4
CELERY_RESULT_BACKEND: redis://localhost:6379/4
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres # pragma: allowlist secret
WEBPACK_DISABLE_LOADER_STATS: "True"
EXTERNAL_COURSE_SYNC_API_KEY: fake_external_course_sync_api_key # pragma: allowlist secret
MAILGUN_KEY: fake_mailgun_key
MAILGUN_SENDER_DOMAIN: other.fake.site
MITOL_DIGITAL_CREDENTIALS_VERIFY_SERVICE_BASE_URL: http://localhost:5000
MITOL_DIGITAL_CREDENTIALS_HMAC_SECRET: fake.hmac.secret # pragma: allowlist secret
MITOL_HUBSPOT_API_PRIVATE_TOKEN: test-token
MITXPRO_ADMIN_EMAIL: example@localhost
MITXPRO_BASE_URL: http://localhost:8053
MITXPRO_DB_DISABLE_SSL: "True"
MITXPRO_EMAIL_BACKEND: django.core.mail.backends.locmem.EmailBackend
MITXPRO_NOTIFICATION_EMAIL_BACKEND: django.core.mail.backends.locmem.EmailBackend
MITXPRO_SECURE_SSL_REDIRECT: "False"
MITXPRO_USE_S3: "False"
OPENEDX_API_BASE_URL: http://localhost:18000
OPENEDX_API_CLIENT_ID: fake_client_id
OPENEDX_API_CLIENT_SECRET: fake_client_secret # pragma: allowlist secret
SECRET_KEY: local_unsafe_key # pragma: allowlist secret
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: ./coverage.xml
javascript-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup NodeJS
uses: actions/setup-node@27082cecf3ff7a1742dbd5e12605f0cb59dce2d9 # v2-beta
with:
node-version: 24.14.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Lints
run: npm run lint-check
- name: Code formatting
run: npm run fmt:check
- name: Scss lint
run: npm run scss-lint
- name: Flow
run: npm run flow
- name: Tests
run: npm run test
env:
CODECOV: true
NODE_ENV: development
- name: Webpack build
run: node node_modules/webpack/bin/webpack.js --config webpack.config.prod.js --bail
- name: Upload test coverage to CodeCov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
files: coverage/lcov.info