From 5c16686b0442d6c77be7a5e728dc5160656e59fa Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:12:39 -0400 Subject: [PATCH 1/6] ci: Add GitHub workflow to run lint checks daily and on every push or pull request. --- .github/workflows/lint.yaml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..73412e8 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,49 @@ +name: "lint" + +on: + pull_request: + types: ["opened", "reopened", "synchronize"] + push: + schedule: + # Run at midnight UTC every day with 15 minutes delay added to avoid high load periods + - cron: "15 0 * * *" + workflow_dispatch: + +permissions: {} + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + + # Cancel in-progress jobs for efficiency + cancel-in-progress: true + +jobs: + lint: + strategy: + matrix: + os: ["macos-latest", "ubuntu-latest"] + runs-on: "${{matrix.os}}" + steps: + - uses: "actions/checkout@v4" + with: + submodules: "recursive" + + - uses: "actions/setup-python@v5" + with: + python-version: "3.8" + + - name: "Install task" + run: "npm install -g @go-task/cli" + + - if: "matrix.os == 'macos-latest'" + name: "Install coreutils (for md5sum)" + run: "brew install coreutils" + + - name: "Log tool versions" + run: |- + md5sum --version + python --version + tar --version + task --version + + - run: "task lint:check" From 73f5f7e5adbd91cdca48c4fed15a1012a62b7789 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:13:08 -0400 Subject: [PATCH 2/6] Use pull_request's default settings. --- .github/workflows/lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 73412e8..73779bd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -2,7 +2,6 @@ name: "lint" on: pull_request: - types: ["opened", "reopened", "synchronize"] push: schedule: # Run at midnight UTC every day with 15 minutes delay added to avoid high load periods From c73b17cd032fbc7726bcb3c88952dfd35e2665df Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:13:57 -0400 Subject: [PATCH 3/6] Add lint violation. --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 73779bd..aefe253 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -25,7 +25,7 @@ jobs: steps: - uses: "actions/checkout@v4" with: - submodules: "recursive" + submodules: recursive - uses: "actions/setup-python@v5" with: From 3a65e4841a0c7dcfcfe051f468eb92643d725893 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:15:02 -0400 Subject: [PATCH 4/6] Revert "Add lint violation." This reverts commit c73b17cd032fbc7726bcb3c88952dfd35e2665df. --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index aefe253..73779bd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -25,7 +25,7 @@ jobs: steps: - uses: "actions/checkout@v4" with: - submodules: recursive + submodules: "recursive" - uses: "actions/setup-python@v5" with: From 7dd08bbc84834d611469ec21fef37cbe648b8f31 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:16:17 -0400 Subject: [PATCH 5/6] Edit comment. --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 73779bd..7ebfb18 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -4,7 +4,7 @@ on: pull_request: push: schedule: - # Run at midnight UTC every day with 15 minutes delay added to avoid high load periods + # Run daily at 00:15 UTC (the 15 is to avoid periods of high load) - cron: "15 0 * * *" workflow_dispatch: From 083d17fe9653c9785b2a0b42415e2bd03d9f9a3a Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:17:38 -0400 Subject: [PATCH 6/6] Rename workflow. --- .github/workflows/{lint.yaml => code-linting-checks.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{lint.yaml => code-linting-checks.yaml} (97%) diff --git a/.github/workflows/lint.yaml b/.github/workflows/code-linting-checks.yaml similarity index 97% rename from .github/workflows/lint.yaml rename to .github/workflows/code-linting-checks.yaml index 7ebfb18..b497025 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/code-linting-checks.yaml @@ -1,4 +1,4 @@ -name: "lint" +name: "code-linting-checks" on: pull_request: