2024-05-27 19:27:46 -04:00
|
|
|
name: Lint on PR
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint-python38:
|
|
|
|
name: Lint with Python 3.8
|
2024-05-27 19:31:01 -04:00
|
|
|
runs-on: docker
|
2024-05-27 19:27:46 -04:00
|
|
|
container:
|
|
|
|
image: docker.mafyuh.xyz/python:3.8-slim-bullseye
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.8
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yaml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|
2024-05-27 19:27:46 -04:00
|
|
|
|
|
|
|
lint-python39:
|
|
|
|
name: Lint with Python 3.9
|
2024-05-27 19:31:01 -04:00
|
|
|
runs-on: docker
|
2024-05-27 19:27:46 -04:00
|
|
|
container:
|
|
|
|
image: docker.mafyuh.xyz/python:3.9-slim-bullseye
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.9
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yaml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|
2024-05-27 19:27:46 -04:00
|
|
|
|
|
|
|
lint-python310:
|
|
|
|
name: Lint with Python 3.10
|
2024-05-27 19:31:01 -04:00
|
|
|
runs-on: docker
|
2024-05-27 19:27:46 -04:00
|
|
|
container:
|
|
|
|
image: docker.mafyuh.xyz/python:3.10-slim-bullseye
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.10
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yaml files
|
2024-05-27 19:28:37 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|