Some workflows had links or conditionals based on the old repo name so update them to use the new repository name.
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Lint Python Imports
|
|
|
|
on:
|
|
pull_request:
|
|
merge_group:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
lint-imports:
|
|
name: Lint Python Imports
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out branch
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install system requirements
|
|
run: sudo apt update && sudo apt install -y libxmlsec1-dev
|
|
|
|
- name: Install pip
|
|
run: make pre-requirements
|
|
|
|
- name: Get pip cache dir
|
|
id: pip-cache-dir
|
|
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache pip dependencies
|
|
id: cache-dependencies
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
|
restore-keys: ${{ runner.os }}-pip-
|
|
|
|
- name: Install python dependencies
|
|
run: make dev-requirements
|
|
|
|
# As long there are sub-projects[1] in openedx-platform, we analyze each
|
|
# project separately here, in order to make import-linting errors easier
|
|
# to pinpoint.
|
|
#
|
|
# [1] https://openedx.atlassian.net/browse/BOM-2579
|
|
|
|
- name: Analyze imports (repo root)
|
|
run: make lint-imports
|