Skip to content

Commit 7f272dc

Browse files
authored
Merge pull request #3219 from devspace-sh/DSP-176
* Adds check for websocket source * Updates go toolchain * Various fixes for unit and e2e tests * Fixes for npm installation
2 parents af83b7e + 8790cab commit 7f272dc

30 files changed

Lines changed: 516 additions & 313 deletions

File tree

.github/workflows/e2e-tests.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
strategy:
2525
matrix:
2626
kubernetes_version:
27-
- v1.27.3
28-
- v1.28.0
27+
- v1.35.0
28+
- v1.34.3
2929
steps:
3030
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3131
- name: Checkout repo
@@ -36,11 +36,11 @@ jobs:
3636
with:
3737
version: ${{ matrix.kubernetes_version }}
3838

39-
# Creates KinD with using k8s versions from the matrix above
40-
- name: Set up kind with K8s version v1.22.4
39+
# Creates kind using the Kubernetes versions from the matrix above
40+
- name: Set up kind cluster
4141
uses: engineerd/setup-kind@v0.5.0
4242
with:
43-
version: "v0.20.0"
43+
version: "v0.31.0"
4444
image: kindest/node:${{ matrix.kubernetes_version }}
4545

4646
- name: Testing kind cluster set-up
@@ -53,8 +53,8 @@ jobs:
5353
- name: Set up Go
5454
uses: actions/setup-go@v5
5555
with:
56-
go-version: "1.24"
57-
56+
go-version: "1.25"
57+
5858
- name: Build devspacehelper
5959
run: |
6060
mkdir -p ~/.devspace/devspacehelper/latest

.github/workflows/lint.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ jobs:
1717
name: lint
1818
runs-on: ubuntu-latest
1919
steps:
20+
- uses: actions/checkout@v4
2021
- uses: actions/setup-go@v5
2122
with:
22-
go-version: "1.22"
23-
- uses: actions/checkout@v3
23+
go-version: "1.25"
2424
- name: Run golangci-lint
25-
uses: golangci/golangci-lint-action@v3.2.0
25+
uses: golangci/golangci-lint-action@v7
2626
with:
27+
version: v2.11.4
28+
only-new-issues: true
2729
args:
2830
-v
2931
--config=.golangci.yml

.github/workflows/npm.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
linux:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v1
16-
- uses: actions/setup-node@v1
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1717
with:
18-
node-version: 12
18+
node-version: 20
1919
registry-url: https://registry.npmjs.org/
2020
- run: |
2121
npm install -g
@@ -35,10 +35,10 @@ jobs:
3535
windows:
3636
runs-on: windows-2019
3737
steps:
38-
- uses: actions/checkout@v1
39-
- uses: actions/setup-node@v1
38+
- uses: actions/checkout@v4
39+
- uses: actions/setup-node@v4
4040
with:
41-
node-version: 12
41+
node-version: 20
4242
registry-url: https://registry.npmjs.org/
4343
- run: |
4444
npm install -g

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Set up Go
6262
uses: actions/setup-go@v5
6363
with:
64-
go-version: "1.22"
64+
go-version: "1.25"
6565
- id: get_version
6666
run: |
6767
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')

.github/workflows/unit-tests.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,32 @@ jobs:
2929
- name: Set up Go
3030
uses: actions/setup-go@v5
3131
with:
32-
go-version: "1.24"
32+
go-version: "1.25"
3333

3434
- name: Check out code into the Go module directory
3535
uses: actions/checkout@v1
3636

3737
- name: Test
38-
run: ./hack/coverage.bash
38+
shell: bash
39+
run: |
40+
source ./hack/remove-system-helm.sh
41+
./hack/coverage.bash
3942
4043
test-unit-windows:
4144
runs-on: windows-latest
4245
name: unit-test-windows-latest
43-
46+
4447
steps:
4548
- name: Set up Go
4649
uses: actions/setup-go@v5
4750
with:
48-
go-version: "1.24"
49-
51+
go-version: "1.25"
52+
5053
- name: Check out code into the Go module directory
5154
uses: actions/checkout@v1
5255

5356
- name: Test
54-
run: ./hack/coverage.bash
5557
shell: bash
58+
run: |
59+
source ./hack/remove-system-helm.sh
60+
./hack/coverage.bash

.golangci.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
1+
version: "2"
2+
13
run:
24
timeout: 10m
35

4-
issues:
5-
exclude-dirs:
6-
- hack/
7-
- docs/
8-
96
linters:
10-
disable-all: true
7+
default: none
118
enable:
129
# - deadcode # deprecated https://github.com/golangci/golangci-lint/issues/1841
13-
- gosimple
1410
- govet
1511
- ineffassign
1612
- misspell
1713
- unused
1814
# - varcheck # deprecated https://github.com/golangci/golangci-lint/issues/1841
19-
- staticcheck
15+
- staticcheck # includes gosimple and stylecheck in v2
2016
- errcheck
2117
# - goimports
2218
- dupl
2319
- nakedret
24-
- stylecheck
2520
# - gofmt
2621
# - golint
2722
# - structcheck # deprecated https://github.com/golangci/golangci-lint/issues/1841
28-
29-
linters-settings:
30-
gofmt:
31-
simplify: true
32-
dupl:
33-
threshold: 400
23+
settings:
24+
dupl:
25+
threshold: 400
26+
exclusions:
27+
paths:
28+
- hack/
29+
- docs/
30+
- assets/assets.go

assets/assets.go

Lines changed: 60 additions & 11 deletions
Large diffs are not rendered by default.

dist/npm/bin/devspace

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ if [ ! -f "$BINARY" ] || [ "$STAT" -lt 10000 ]; then
1111
INDEX_FILE="/index.js"
1212

1313
if [ ! -f "$BASEDIR/$INDEX_FILE" ]; then
14-
BASEDIR="$(dirname $0)/../lib/node_modules/devspace"
14+
BASEDIR="$(dirname $0)/../devspace"
1515

1616
if [ ! -f "$BASEDIR/$INDEX_FILE" ]; then
17-
BASEDIR="$(dirname $0)/node_modules/devspace"
17+
BASEDIR="$(dirname $0)/../lib/node_modules/devspace"
1818

1919
if [ ! -f "$BASEDIR/$INDEX_FILE" ]; then
20-
BASEDIR=$(/usr/bin/env npm root -g)/devspace
20+
BASEDIR="$(dirname $0)/node_modules/devspace"
2121

2222
if [ ! -f "$BASEDIR/$INDEX_FILE" ]; then
23+
BASEDIR=$(/usr/bin/env npm root -g)/devspace
24+
2325
if [ ! -f "$BASEDIR/$INDEX_FILE" ]; then
2426
BASEDIR=$(/usr/bin/env yarn global dir)/node_modules/devspace
2527

dist/npm/bin/devspace.cmd

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,28 @@ SET indexFile=\index.js
1313
echo "!basedir!\!indexFile!"
1414

1515
IF NOT EXIST "!basedir!\!indexFile!" (
16-
SET basedir=%~dp0\..\lib\node_modules\devspace
16+
SET basedir=%~dp0\..\devspace
1717

1818
IF NOT EXIST "!basedir!\!indexFile!" (
19-
SET basedir=%~dp0\node_modules\devspace
19+
SET basedir=%~dp0\..\lib\node_modules\devspace
2020

2121
IF NOT EXIST "!basedir!\!indexFile!" (
22-
FOR /F "tokens=* USEBACKQ" %%F IN (`npm root -g`) DO (
23-
SET basedir=%%F\devspace
24-
)
22+
SET basedir=%~dp0\node_modules\devspace
2523

2624
IF NOT EXIST "!basedir!\!indexFile!" (
27-
FOR /F "tokens=* USEBACKQ" %%F IN (`yarn global dir`) DO (
28-
SET basedir=%%F\node_modules\devspace
25+
FOR /F "tokens=* USEBACKQ" %%F IN (`npm root -g`) DO (
26+
SET basedir=%%F\devspace
2927
)
3028

3129
IF NOT EXIST "!basedir!\!indexFile!" (
32-
echo Unable to find global npm/yarn dir
33-
exit /b 1
30+
FOR /F "tokens=* USEBACKQ" %%F IN (`yarn global dir`) DO (
31+
SET basedir=%%F\node_modules\devspace
32+
)
33+
34+
IF NOT EXIST "!basedir!\!indexFile!" (
35+
echo Unable to find global npm/yarn dir
36+
exit /b 1
37+
)
3438
)
3539
)
3640
)

0 commit comments

Comments
 (0)