File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Taskfiles
2
+
3
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4
+ on :
5
+ push :
6
+ paths :
7
+ - " .github/workflows/check-taskfiles.ya?ml"
8
+ - " **/Taskfile.ya?ml"
9
+ pull_request :
10
+ paths :
11
+ - " .github/workflows/check-taskfiles.ya?ml"
12
+ - " **/Taskfile.ya?ml"
13
+ schedule :
14
+ # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
15
+ - cron : " 0 8 * * TUE"
16
+ workflow_dispatch :
17
+ repository_dispatch :
18
+
19
+ jobs :
20
+ validate :
21
+ name : Validate ${{ matrix.file }}
22
+ runs-on : ubuntu-latest
23
+
24
+ strategy :
25
+ fail-fast : false
26
+
27
+ matrix :
28
+ file :
29
+ - ./Taskfile.yml
30
+
31
+ steps :
32
+ - name : Checkout repository
33
+ uses : actions/checkout@v2
34
+
35
+ - name : Download JSON schema for Taskfiles
36
+ id : download-schema
37
+ uses : carlosperate/download-file-action@v1.0.3
38
+ with :
39
+ # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
40
+ file-url : https://json.schemastore.org/taskfile.json
41
+ location : ${{ runner.temp }}/taskfile-schema
42
+ file-name : taskfile.json
43
+
44
+ - name : Install JSON schema validator
45
+ run : sudo npm install --global ajv-cli
46
+
47
+ - name : Validate ${{ matrix.file }}
48
+ run : |
49
+ # See: https://github.com/ajv-validator/ajv-cli#readme
50
+ ajv validate \
51
+ --strict=false \
52
+ -s "${{ steps.download-schema.outputs.file-path }}" \
53
+ -d "${{ matrix.file }}"
Original file line number Diff line number Diff line change 3
3
[ ![ Test Go status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/test-go.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/test-go.yml )
4
4
[ ![ Check Go status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-go.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-go.yml )
5
5
[ ![ Check Prettier Formatting status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-prettier-formatting-task.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-prettier-formatting-task.yml )
6
+ [ ![ Check Taskfiles status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-taskfiles.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-taskfiles.yml )
6
7
[ ![ Spell Check status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/spell-check-task.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/spell-check-task.yml )
7
8
[ ![ Check License status] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-license.yml/badge.svg )] ( https://github.com/arduino/libraries-repository-engine/actions/workflows/check-license.yml )
8
9
Original file line number Diff line number Diff line change 6
6
sh : echo $(go list ./... | tr '\n' ' ')
7
7
8
8
tasks :
9
+ build :
10
+ desc : Build the project
11
+ deps :
12
+ - task : go:build
13
+
14
+ check :
15
+ desc : Check for problems with the project
16
+ deps :
17
+ - task : general:check-spelling
18
+ - task : go:lint
19
+ - task : go:test
20
+ - task : go:vet
21
+
22
+ format :
23
+ desc : Correct the formatting of the project's files
24
+ deps :
25
+ - task : general:format-prettier
26
+ - task : go:format
27
+
9
28
go:build :
10
29
desc : Build the project
11
30
cmds :
You can’t perform that action at this time.
0 commit comments