Skip to content

chore(deps): update actions/setup-python digest to 0b93645 #1674

chore(deps): update actions/setup-python digest to 0b93645

chore(deps): update actions/setup-python digest to 0b93645 #1674

Workflow file for this run

name: CI
on: [push]
jobs:
python-tests:
runs-on: ubuntu-latest
services:
# Label used to access the service container
db:
# Docker Hub image
image: postgres:16
# Set 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:5.0.14
ports:
- 6379:6379
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: update apt
run: sudo apt-get update -y
- name: Apt install
run: cat Aptfile | sudo xargs apt-get install -y
- name: Install poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version: "3.12.1"
cache: "poetry"
- name: Validate lockfile
run: poetry lock --check
- name: Install dependencies
run: poetry install --no-interaction
- name: Lint
run: poetry run ruff check --extend-ignore=D1 $(git ls-files '*.py')
- name: Tests
run: |
export MEDIA_ROOT="$(mktemp -d)"
./scripts/test/python_tests.sh
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres # pragma: allowlist secret
CELERY_TASK_ALWAYS_EAGER: "True"
CELERY_BROKER_URL: redis://localhost:6379/4
CELERY_RESULT_BACKEND: redis://localhost:6379/4
MITOL_UE_COOKIE_NAME: "mitolue"
MITOL_UE_COOKIE_DOMAIN: "odl.local"
MITOL_UE_BASE_URL: "http://localhost:8073"
MITOL_UE_HOSTNAME: "ue.odl.local"
MITOL_UE_JWT_SECRET: ""
MITOL_UE_USE_S3: "False"
MITOL_UE_DB_DISABLE_SSL: "True"
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
file: ./coverage.xml
openapi-generated-client-check-v0:
# This job checks that the output of openapi-generator-typescript-axios that
# is checked into version control is up-to-date.
env:
OPENAPI_SCHEMA: ./openapi/specs/v0.yaml
GENERATOR_IGNORE_FILE: ./frontends/api/.openapi-generator-ignore
GENERATOR_OUTPUT_DIR_CI: ./frontends/api/tmp/generated/v0
GENERATOR_OUTPUT_DIR_VC: ./frontends/api/src/generated/v0
COREPACK_ENABLE_DOWNLOAD_PROMPT: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: "^20"
cache: "npm"
cache-dependency-path: "package-lock.json"
- name: Install dependencies
run: npm i
- name: Generate Fresh API Client
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: typescript-axios
openapi-file: $OPENAPI_SCHEMA
generator-tag: v7.2.0
command-args: |
--output $GENERATOR_OUTPUT_DIR_CI \
--ignore-file-override $GENERATOR_IGNORE_FILE \
-c scripts/openapi-configs/typescript-axios-v0.yaml
- name: Format freshly generated client
run: npx prettier $GENERATOR_OUTPUT_DIR_CI/**/*.ts --no-semi --write
# Kept getting tripped up on npmignore and the git push script, neither
# of which are really important, so just check the generated TypeScript
# files instead.
- name: Check VC client is up-to-date
run: |
mkdir $GENERATOR_OUTPUT_DIR_VC/ts
mkdir $GENERATOR_OUTPUT_DIR_CI/ts
cp $GENERATOR_OUTPUT_DIR_VC/*.ts $GENERATOR_OUTPUT_DIR_VC/ts
cp $GENERATOR_OUTPUT_DIR_CI/*.ts $GENERATOR_OUTPUT_DIR_CI/ts
diff $GENERATOR_OUTPUT_DIR_CI/ts $GENERATOR_OUTPUT_DIR_VC/ts \
|| { echo "OpenAPI spec is out of date. Please regenerate via ./scripts/generate_openapi.sh"; exit 1; }