Skip to content

Commit fc04741

Browse files
committed
remove unused task
1 parent 7442c09 commit fc04741

File tree

4 files changed

+8
-83
lines changed

4 files changed

+8
-83
lines changed

.github/workflows/test-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Update with Arduino CLI
1+
name: test the system update flow
22

33
on:
44
push:
@@ -28,4 +28,4 @@ jobs:
2828
env:
2929
GH_TOKEN: ${{ secrets.ARDUINOBOT_TOKEN }}
3030
run: |
31-
go test -count=1 --timeout 30m -v ./internal/e2e/updatetest -- --arch amd64
31+
go tool task test:update

Taskfile.yml

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ vars:
1212
RUNNER_VERSION: "0.5.0"
1313
VERSION: # if version is not passed we hack the semver by encoding the commit as pre-release
1414
sh: echo "${VERSION:-0.0.0-$(git rev-parse --short HEAD)}"
15-
NEW_PACKAGE:
16-
sh: ls -1 ./build/arduino-app-cli_*.deb 2>/dev/null | head -n 1
17-
GITHUB_TOKEN_FILE: ./github_token.txt
1815

1916
tasks:
2017
init:
@@ -53,9 +50,13 @@ tasks:
5350

5451
test:internal:
5552
cmds:
56-
- go build ./cmd/arduino-app-cli # needed for e2e tests
53+
- go build ./cmd/arduino-app-cli
5754
- task: generate
58-
- go test $(go list ./internal/... ./cmd/... | grep -v internal/e2e/updatetest) -v -race {{ .CLI_ARGS }} # exclude deb package update tests
55+
- go test $(go list ./internal/... ./cmd/... | grep -v internal/e2e/updatetest) -v -race {{ .CLI_ARGS }}
56+
57+
test:update:
58+
cmds:
59+
- go test --timeout 30m -v ./internal/e2e/updatetest
5960

6061
test:pkg:
6162
desc: Run only tests in the pkg directory
@@ -127,44 +128,6 @@ tasks:
127128
echo "Examples successfully cloned."
128129
silent: false
129130

130-
build-image:
131-
desc: "Builds the mock-repo Docker image (requires GITHUB_TOKEN_FILE)"
132-
deps: [build-deb]
133-
vars:
134-
PKG_PATH: "{{.NEW_PACKAGE}}"
135-
cmds:
136-
# --- MODIFIED ---
137-
# Check for both the package and the token file
138-
- |
139-
if [ ! -f "{{.GITHUB_TOKEN_FILE}}" ]; then
140-
echo "Error: GitHub token file not found at {{.GITHUB_TOKEN_FILE}}"
141-
echo "Please create this file and add your GitHub PAT to it."
142-
exit 1
143-
fi
144-
- |
145-
echo "Using package: {{.PKG_PATH}}"
146-
echo "Using GitHub token from: {{.GITHUB_TOKEN_FILE}}"
147-
148-
# Enable BuildKit and pass the secret
149-
DOCKER_BUILDKIT=1 docker build \
150-
--secret id=github_token,src={{.GITHUB_TOKEN_FILE}} \
151-
--build-arg NEW_PACKAGE_PATH={{.PKG_PATH}} \
152-
-t newdeb \
153-
-f test.Dockerfile .
154-
status:
155-
- '[[ -f "{{.PKG_PATH}}" ]]'
156-
- '[[ -f "{{.DOCKERFILE_NAME}}" ]]'
157-
# Re-build if token file changes
158-
- '[[ -f "{{.GITHUB_TOKEN_FILE}}" ]]'
159-
160-
test-deb:
161-
desc: Test the debian package locally
162-
deps:
163-
- build-deb
164-
cmds:
165-
- docker build --no-cache -t mock-apt-repo -f test.Dockerfile .
166-
- docker run --rm -it --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --name apt-test-update mock-apt-repo
167-
168131
arduino-app-cli:build:local:
169132
desc: "Build the arduino-app-cli locally"
170133
cmds:
File renamed without changes.

internal/testtools/package_update.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)