From 0a1029c2a2966438ffa2a5fa2d14d202e5a74ba4 Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Mon, 3 May 2021 15:34:37 -0700 Subject: [PATCH] actions: consolidate yamlint Lets not trust that everyone remembers to lint themselves or that they fetch the repo in order to execute their job. Also rename workflow file to be a bit more generic Signed-off-by: Curtis Malainey --- .../{shallow_checkpatch.yml => codestyle.yml} | 12 ++++++++---- .github/workflows/installer.yml | 3 --- .github/workflows/pull-request.yml | 13 ------------- .github/workflows/zephyr.yml | 3 --- 4 files changed, 8 insertions(+), 23 deletions(-) rename .github/workflows/{shallow_checkpatch.yml => codestyle.yml} (90%) diff --git a/.github/workflows/shallow_checkpatch.yml b/.github/workflows/codestyle.yml similarity index 90% rename from .github/workflows/shallow_checkpatch.yml rename to .github/workflows/codestyle.yml index 6a0b2e4af..b901db00b 100644 --- a/.github/workflows/shallow_checkpatch.yml +++ b/.github/workflows/codestyle.yml @@ -9,7 +9,7 @@ # github.com also has a powerful web editor that can be used without # committing. -name: checkpatch +name: codestyle # yamllint disable-line rule:truthy on: [pull_request] @@ -31,9 +31,6 @@ jobs: - uses: actions/checkout@v2 with: {fetch-depth: 2} - - name: yamllint ourselves - run: yamllint .github/workflows/shallow_checkpatch.yml - - name: install codespell run: sudo apt-get -y install codespell && dpkg -L codespell | grep dict @@ -51,3 +48,10 @@ jobs: - name: checkpatch --strict run: .github/workflows/checkpatch_list.sh ${CHK_CMD_OPTS} --strict < PR_SHAs.txt + yamllint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: run yamllint + run: yamllint --strict .github/workflows/*.yml diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 8cafec537..469a2402f 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -23,9 +23,6 @@ jobs: # From time to time this will catch a git tag and change SOF_VERSION with: {fetch-depth: 50, submodules: recursive} - - name: yamllint ourselves - run: yamllint .github/workflows/installer.yml - - name: docker run: docker pull thesofproject/sof && docker tag thesofproject/sof sof diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e67d64317..713b3083f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -139,16 +139,3 @@ jobs: PLATFORM: ${{ matrix.platform }} run: ./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh ${PLATFORM} - - yamllint-gh: - name: yamllint /.github/workflows/ - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - name: apt install yamllint - run: sudo apt-get -y install yamllint - - - name: yamllint github actions - run: yamllint .github/workflows/pull-request.yml diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index e6de975e6..617e41c3c 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -15,9 +15,6 @@ jobs: # From time to time this will catch a git tag and change SOF_VERSION with: {fetch-depth: 10, submodules: recursive} - - name: yamllint ourselves - run: yamllint .github/workflows/zephyr.yml - - name: build run: docker run -v "$(pwd)":/workdir docker.io/zephyrprojectrtos/zephyr-build:v0.17.3