1
1
version : ' 3'
2
2
3
3
tasks :
4
-
5
- build :
4
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
5
+ go: build :
6
6
desc : Build the project, to use a specific version use `task build TAG_VERSION=x.x.x`
7
+ dir : " {{.DEFAULT_GO_MODULE_PATH}}"
7
8
cmds :
8
9
- go build -v -i {{default "" .ADDITIONAL_FLAGS}} -o {{default "arduino-create-agent" .APP_NAME}} -ldflags '-X main.version={{default .TAG_TEST .TAG_VERSION}} -X main.git_revision={{.COMMIT}} {{default "" .WIN_FLAGS}}'
9
10
vars :
10
11
COMMIT :
11
12
sh : git log -n 1 --format=%h
12
13
13
- build-cli :
14
- desc : Build the project without tray support
14
+ go: build-cli :
15
+ desc : Build the project without tray icon support
15
16
cmds :
16
- - task : build
17
+ - task : go: build
17
18
vars :
18
19
APP_NAME : arduino-create-agent_cli
19
20
ADDITIONAL_FLAGS : -tags cli
20
21
21
- build-win :
22
+ go: build-win :
22
23
desc : Build the project for win, to build 32bit `export GOARCH=386` and for 64 bit `export GOARCH=amd64` before `task build-win`
23
24
cmds :
24
25
- rsrc -arch {{.GOARCH}} -manifest manifest.xml # GOARCH shoud be either amd64 or 386
25
- - task : build
26
+ - task : go: build
26
27
vars :
27
28
APP_NAME : arduino-create-agent.exe
28
29
WIN_FLAGS : -H=windowsgui
29
30
- rm *.syso # rm file to avoid compilation problems on other platforms
30
31
32
+ go:build-win-cli :
33
+ desc : Build the project fow win without tray icon support
34
+ cmds :
35
+ - task : go:build
36
+ vars :
37
+ APP_NAME : arduino-create-agent_cli.exe
38
+ ADDITIONAL_FLAGS : -tags cli
39
+
31
40
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
32
41
go:test :
33
42
desc : Run unit tests
@@ -42,11 +51,26 @@ tasks:
42
51
-coverprofile=coverage_unit.txt \
43
52
{{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
44
53
45
- test-e2e :
46
- desc : Run end 2 end tests
54
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-integration-task/Taskfile.yml
55
+ go:test-integration :
56
+ desc : Run integration tests
57
+ deps :
58
+ # - task: go:build # we build it in the CI and not in the task because _cli version is required and build procedure is different on win
59
+ - task : poetry:install-deps
60
+ cmds :
61
+ - poetry run pytest tests
62
+
63
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
64
+ poetry:install-deps :
65
+ desc : Install dependencies managed by Poetry
47
66
cmds :
48
67
- poetry install --no-root
49
- - poetry run pytest test
68
+
69
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
70
+ poetry:update-deps :
71
+ desc : Update all dependencies managed by Poetry to their newest versions
72
+ cmds :
73
+ - poetry update
50
74
51
75
check :
52
76
desc : Check fmt and lint
0 commit comments