Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/check-ci-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ on:
push:
paths:
- ".github/workflows/*.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- "workflow-templates/*.ya?ml"
pull_request:
paths:
- ".github/workflows/*.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- "workflow-templates/*.ya?ml"
schedule:
Expand All @@ -33,17 +37,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Sync files
run: |
task \
--silent \
ci:sync
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
ci:sync

- name: Check file duplicates sync
run: |
Expand Down
94 changes: 52 additions & 42 deletions .github/workflows/check-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "other/clang-format-configuration/testdata/**"
- "other/clang-format-configuration/.clang-format"
- ".npmrc"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -19,6 +21,8 @@ on:
- "other/clang-format-configuration/testdata/**"
- "other/clang-format-configuration/.clang-format"
- ".npmrc"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -43,22 +47,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Validate ClangFormat configuration files
run: |
task \
--silent \
clang-format:validate
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
clang-format:validate

check-config:
runs-on: ubuntu-latest
Expand All @@ -68,17 +72,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Set environment variables
run: |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
echo "CLANG_FORMAT_VERSION=$(
go tool \
github.com/go-task/task/v3/cmd/task clang-format:get-version
)" >>"$GITHUB_ENV"
else
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
fi
Expand Down Expand Up @@ -110,10 +116,11 @@ jobs:
- name: Check ClangFormat configuration file
id: check
run: |
task \
--silent \
clang-format:check-config \
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}"
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
clang-format:check-config \
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}"

- name: Save effective configuration file to a workflow artifact
if: >
Expand All @@ -133,17 +140,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Set environment variables
run: |
# See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
echo "CLANG_FORMAT_VERSION=$(
go tool \
github.com/go-task/task/v3/cmd/task clang-format:get-version
)" >>"$GITHUB_ENV"
else
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
fi
Expand Down Expand Up @@ -175,10 +184,11 @@ jobs:
- name: Check ClangFormat output
id: check
run: |
task \
clang-format:check-output \
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" \
WORKING_FOLDER="${{ env.WORKING_FOLDER }}"
go tool \
github.com/go-task/task/v3/cmd/task \
clang-format:check-output \
CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" \
WORKING_FOLDER="${{ env.WORKING_FOLDER }}"

- name: Save formatted test data to a workflow artifact
if: >
Expand All @@ -198,17 +208,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Check ClangFormat test data
run: |
task \
--silent \
clang-format:check-testdata
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
clang-format:check-testdata

convert:
runs-on: ubuntu-latest
Expand All @@ -228,18 +238,18 @@ jobs:
with:
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Convert the ClangFormat configuration
run: |
task \
--silent \
clang-format:convert \
OUTPUT_PATH="${{ env.CONVERSION_OUTPUT_PATH }}"
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
clang-format:convert \
OUTPUT_PATH="${{ env.CONVERSION_OUTPUT_PATH }}"

- name: Save conversion to a workflow artifact
uses: actions/upload-artifact@v4
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/check-community-health-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
push:
paths:
- ".github/workflows/check-community-health-sync.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
Expand All @@ -19,6 +21,8 @@ on:
pull_request:
paths:
- ".github/workflows/check-community-health-sync.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
Expand All @@ -39,17 +43,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Sync files
run: |
task \
--silent \
github:sync
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
github:sync

- name: Check file duplicates sync
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/check-config-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Sync files
run: |
task \
--silent \
config:sync
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
config:sync

- name: Check file duplicates sync
run: |
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/check-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ on:
push:
paths:
- ".github/workflows/check-dependabot.yml"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
- "**/dependabot.ya?ml"
pull_request:
paths:
- ".github/workflows/check-dependabot.yml"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -31,16 +35,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Validate Dependabot configuration files
run: task dependabot:validate
run: |
go tool \
github.com/go-task/task/v3/cmd/task dependabot:validate
22 changes: 13 additions & 9 deletions .github/workflows/check-eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- ".github/workflows/check-eslint.yml"
- "workflow-templates/assets/check-javascript/.eslintrc.yml"
- ".npmrc"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -15,6 +17,8 @@ on:
- ".github/workflows/check-eslint.yml"
- "workflow-templates/assets/check-javascript/.eslintrc.yml"
- ".npmrc"
- "go.mod"
- "go.sum"
- "package.json"
- "package-lock.json"
- "Taskfile.ya?ml"
Expand All @@ -33,19 +37,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json

- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Validate workflows
run: |
task \
--silent \
eslint:validate
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
eslint:validate
Loading
Loading