From 3c0c27965836328abd2668dcd77710ee2460535e Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 8 Sep 2023 04:24:06 +0200 Subject: Add `yamllint` (#26965) So that https://github.com/go-gitea/gitea/pull/26964 does not happen again. Merge this after that PR. Config is based on [node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml). --------- Co-authored-by: techknowlogick --- .github/workflows/files-changed.yml | 8 ++++++++ .github/workflows/pull-compliance.yml | 13 +++++++++++++ .github/workflows/pull-db-tests.yml | 6 +++--- 3 files changed, 24 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 24de4076f2..48db7a732e 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -17,6 +17,8 @@ on: value: ${{ jobs.detect.outputs.docker }} swagger: value: ${{ jobs.detect.outputs.swagger }} + yaml: + value: ${{ jobs.detect.outputs.yaml }} jobs: detect: @@ -30,6 +32,7 @@ jobs: templates: ${{ steps.changes.outputs.templates }} docker: ${{ steps.changes.outputs.docker }} swagger: ${{ steps.changes.outputs.swagger }} + yaml: ${{ steps.changes.outputs.yaml }} steps: - uses: actions/checkout@v3 - uses: dorny/paths-filter@v2 @@ -82,3 +85,8 @@ jobs: - "package.json" - "package-lock.json" - ".spectral.yaml" + + yaml: + - "**/*.yml" + - "**/*.yaml" + - ".yamllint.yaml" diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 45dd77fd92..bcbd218846 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -39,6 +39,19 @@ jobs: - run: make deps-py - run: make lint-templates + lint-yaml: + if: needs.files-changed.outputs.yaml == 'true' + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - run: pip install poetry + - run: make deps-py + - run: make lint-yaml + lint-swagger: if: needs.files-changed.outputs.swagger == 'true' needs: files-changed diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index 50c92a9e9b..bbe589d5c8 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -88,7 +88,7 @@ jobs: mysql: image: mysql:5.7 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: test ports: - "3306:3306" @@ -160,7 +160,7 @@ jobs: mysql: image: mysql:5.7 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: test ports: - "3306:3306" @@ -205,7 +205,7 @@ jobs: mysql8: image: mysql:8 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: testgitea ports: - "3306:3306" -- cgit v1.2.3