Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: Lint Python Imports
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
lint-imports:
|
|
name: Lint Python Imports
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Check out branch
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: Install system requirements
|
|
run: sudo apt update && sudo apt install -y libxmlsec1-dev
|
|
|
|
- name: Install pip
|
|
run: python -m pip install -r requirements/pip.txt
|
|
|
|
- name: Get pip cache dir
|
|
id: pip-cache-dir
|
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
- name: Cache pip dependencies
|
|
id: cache-dependencies
|
|
uses: actions/cache@v3
|
|
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: pip install -r requirements/edx/development.txt
|
|
|
|
# As long there are sub-projects[1] in edx-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
|