Re-add new pulp modularity support #530
Workflow file for this run
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: syntax | |
on: | |
pull_request_target: | |
branches: | |
- "**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v42 | |
with: | |
files: | | |
**/*.py | |
- name: Prepare python env | |
if: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: | | |
python -m venv env | |
source env/bin/activate | |
pip install -U pip | |
pip install -r requirements.txt | |
pip install isort[colors] colorama black pylint | |
- name: Run pylint | |
id: pylint | |
if: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: | | |
delimiter='$(openssl rand -hex 8)' | |
echo 'report<<$(delimiter)' >> $GITHUB_OUTPUT | |
env/bin/pylint ${{ steps.changed-files.outputs.all_changed_files }} --py-version 3.9 --exit-zero >> $GITHUB_OUTPUT | |
echo '$(delimiter)' >> $GITHUB_OUTPUT | |
- name: Post pylint output | |
uses: mshick/add-pr-comment@v2 | |
if: ${{ steps.changed-files.outputs.all_changed_files }} | |
with: | |
message: | | |
<details> | |
<summary>pylint output</summary> | |
``` | |
${{ steps.pylint.outputs.report }} | |
``` | |
</details> | |
message-id: pylint-report | |
- name: Run black | |
if: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: env/bin/black ${{ steps.changed-files.outputs.all_changed_files }} --exclude alws/alembic --check --diff --color --target-version py39 | |
- name: Run isort | |
if: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: env/bin/isort ${{ steps.changed-files.outputs.all_changed_files }} --diff --color --check-only --py 39 |