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:
|
2024-05-27 19:59:06 -04:00
|
|
|
image: docker.mafyuh.xyz/python:3.8-slim-bullseye
|
2024-05-27 19:27:46 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 20:01:03 -04:00
|
|
|
- name: Set up Node.js
|
2024-05-27 20:00:19 -04:00
|
|
|
uses: actions/setup-node@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.8
|
2024-05-27 20:01:03 -04:00
|
|
|
run: python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 20:01:03 -04:00
|
|
|
run: pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 20:01:03 -04:00
|
|
|
run: yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 20:04:35 -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
|
|
|
|
|
|
|
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:
|
2024-05-27 19:59:06 -04:00
|
|
|
image: docker.mafyuh.xyz/python:3.9-slim-bullseye
|
2024-05-27 19:27:46 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 20:01:03 -04:00
|
|
|
- name: Set up Node.js
|
2024-05-27 20:00:19 -04:00
|
|
|
uses: actions/setup-node@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.9
|
2024-05-27 20:01:03 -04:00
|
|
|
run: python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 20:01:03 -04:00
|
|
|
run: pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 20:01:03 -04:00
|
|
|
run: yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 20:04:35 -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
|
|
|
|
|
|
|
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:
|
2024-05-27 19:59:06 -04:00
|
|
|
image: docker.mafyuh.xyz/python:3.10-slim-bullseye
|
2024-05-27 19:27:46 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-27 19:35:02 -04:00
|
|
|
uses: actions/checkout@v4
|
2024-05-27 20:01:03 -04:00
|
|
|
- name: Set up Node.js
|
2024-05-27 20:00:19 -04:00
|
|
|
uses: actions/setup-node@v4
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Set up Python 3.10
|
2024-05-27 20:01:03 -04:00
|
|
|
run: python3 --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Install yamllint
|
2024-05-27 20:01:03 -04:00
|
|
|
run: pip3 install yamllint
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Show yamllint version
|
2024-05-27 20:01:03 -04:00
|
|
|
run: yamllint --version
|
2024-05-27 19:27:46 -04:00
|
|
|
- name: Lint .yml files
|
2024-05-27 20:04:35 -04:00
|
|
|
run: |
|
|
|
|
find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +
|