From 98d782a0a0a6047cfc3d17d62453ec6e0df8eee3 Mon Sep 17 00:00:00 2001 From: mafyuh Date: Mon, 27 May 2024 23:27:46 +0000 Subject: [PATCH] Add .forgejo/workflows/yamllint.yml --- .forgejo/workflows/yamllint.yml | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .forgejo/workflows/yamllint.yml diff --git a/.forgejo/workflows/yamllint.yml b/.forgejo/workflows/yamllint.yml new file mode 100644 index 0000000..ef6a73b --- /dev/null +++ b/.forgejo/workflows/yamllint.yml @@ -0,0 +1,63 @@ +name: Lint on PR + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + lint-python38: + name: Lint with Python 3.8 + runs-on: ubuntu-latest + container: + image: docker.mafyuh.xyz/python:3.8-slim-bullseye + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python 3.8 + run: python3 --version + - name: Install yamllint + run: pip3 install yamllint + - name: Show yamllint version + run: yamllint --version + - name: Lint .yml files + run: find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} + + - name: Lint .yaml files + run: find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} + + + lint-python39: + name: Lint with Python 3.9 + runs-on: ubuntu-latest + container: + image: docker.mafyuh.xyz/python:3.9-slim-bullseye + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python 3.9 + run: python3 --version + - name: Install yamllint + run: pip3 install yamllint + - name: Show yamllint version + run: yamllint --version + - name: Lint .yml files + run: find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} + + - name: Lint .yaml files + run: find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} + + + lint-python310: + name: Lint with Python 3.10 + runs-on: ubuntu-latest + container: + image: docker.mafyuh.xyz/python:3.10-slim-bullseye + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python 3.10 + run: python3 --version + - name: Install yamllint + run: pip3 install yamllint + - name: Show yamllint version + run: yamllint --version + - name: Lint .yml files + run: find . -name "*.yml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} + + - name: Lint .yaml files + run: find . -name "*.yaml" ! -name ".drone.yml" -exec yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" {} +