From 3be48ed6e2bd37c1f8b0a4b41834bf4b85b5e1ff Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Tue, 11 Jun 2024 20:04:07 -0400 Subject: [PATCH] [CONFIG] [Github Actions] new tool added: yamllint --- .github/workflows/docker-image.yml | 6 +++++- .github/workflows/yamllint.yml | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 62202cfd..c485a08d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,7 +17,11 @@ jobs: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 - name: Build the Docker image run: make compose/rebuild - - name: Run test in Docker image + - name: Lint in Docker image + run: make compose/lint + - name: Test in Docker image + run: make compose/test + - name: Run in Docker image run: make compose/run - name: Tag Docker image run: docker tag algorithm-exercises-ts:latest algorithm-exercises-ts:${{ github.sha }} diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 00000000..e88812b0 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,23 @@ +--- +name: YAML lint + +on: # yamllint disable-line rule:truthy + push: + branches: ["main", "develop", "feature/*"] + pull_request: + branches: ["main"] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 + + - name: Install yamllint + run: pip install yamllint + + - name: Lint YAML files + run: > + yamllint --strict . + && echo '✔ Your code looks good.'