Skip to content

Commit

Permalink
Use Go module system to manage Task dependency
Browse files Browse the repository at this point in the history
This approach allows control over the version of the Task task runner tool dependency used by project contributors and
the CI/CD system.

Updates will be managed via automated pull requests submitted by Dependabot.
  • Loading branch information
per1234 committed Oct 16, 2023
1 parent 7da369c commit 9c18d65
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 75 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/check-files-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check filenames
run: task --silent general:check-filenames
Expand All @@ -68,11 +73,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check symlinks
run: task --silent general:check-symlinks
8 changes: 4 additions & 4 deletions .github/workflows/check-general-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
go-version-file: go.mod

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check formatting
run: task --silent general:check-formatting
32 changes: 16 additions & 16 deletions .github/workflows/check-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jobs:
go-version-file: ${{ matrix.module.path }}/go.mod

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Modernize usages of outdated APIs
env:
Expand Down Expand Up @@ -114,10 +114,10 @@ jobs:
go-version-file: ${{ matrix.module.path }}/go.mod

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check style
env:
Expand Down Expand Up @@ -149,10 +149,10 @@ jobs:
go-version-file: ${{ matrix.module.path }}/go.mod

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Format code
env:
Expand Down Expand Up @@ -187,10 +187,10 @@ jobs:
go-version-file: ${{ matrix.module.path }}/go.mod

- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Run go mod tidy
env:
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/check-markdown-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@ jobs:
- name: Initialize markdownlint-cli problem matcher
uses: xt0rted/markdownlint-problem-matcher@v2

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Lint
run: task markdown:lint
Expand All @@ -103,11 +108,16 @@ jobs:
with:
node-version-file: package.json

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check links
run: task --silent markdown:check-links
26 changes: 18 additions & 8 deletions .github/workflows/check-npm-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ jobs:
with:
node-version-file: package.json

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Validate package.json
run: task --silent npm:validate
Expand All @@ -90,11 +95,16 @@ jobs:
with:
node-version-file: package.json

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Install npm dependencies
run: task npm:install-deps
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/check-poetry-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ jobs:
--python "$(which python)" \
poetry
- name: Install Task
uses: arduino/setup-task@v1
- name: Install Go
uses: actions/setup-go@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Validate pyproject.toml
run: task poetry:validate
Expand All @@ -98,11 +103,16 @@ jobs:
--python "$(which python)" \
poetry
- name: Install Task
uses: arduino/setup-task@v1
- name: Install Go
uses: actions/setup-go@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Sync lockfile
run: task poetry:sync
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/check-prettier-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,16 @@ jobs:
with:
node-version-file: package.json

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Format with Prettier
run: task general:format-prettier
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/check-workflows-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ jobs:
with:
node-version-file: package.json

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

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Validate workflows
run: task --silent ci:validate
13 changes: 9 additions & 4 deletions .github/workflows/check-yaml-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,16 @@ jobs:
--python "$(which python)" \
poetry
- name: Install Task
uses: arduino/setup-task@v1
- name: Install Go
uses: actions/setup-go@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Check YAML
continue-on-error: ${{ matrix.configuration.continue-on-error }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/spell-check-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,16 @@ jobs:
--python "$(which python)" \
poetry
- name: Install Task
uses: arduino/setup-task@v1
- name: Install Go
uses: actions/setup-go@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
go-version-file: go.mod

- name: Install Task
run: |
go \
install \
github.com/go-task/task/v3/cmd/task
- name: Spell check
run: task general:check-spelling
Loading

0 comments on commit 9c18d65

Please sign in to comment.