This repository has been archived on 2024-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
Auto-Homelab/.forgejo/workflows/yamllint.yml

79 lines
2.4 KiB
YAML
Raw Normal View History

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
uses: actions/checkout@v3
- 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
uses: actions/checkout@v3
- 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
uses: actions/checkout@v3
- 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}}}" {} +