Skip to content

Commit 5cb1585

Browse files
committed
Simplify gh actions
1 parent 79f8ff0 commit 5cb1585

2 files changed

Lines changed: 3 additions & 22 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,21 @@ permissions:
1313
# Optional: allow read access to pull request. Use with `only-new-issues` option.
1414
# pull-requests: read
1515
jobs:
16-
detect-modules:
17-
runs-on: ubuntu-latest
18-
outputs:
19-
modules: ${{ steps.set-modules.outputs.modules }}
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-go@v5
23-
with:
24-
go-version: 1.21.8
25-
- id: set-modules
26-
run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
2716
golangci-lint:
28-
needs: detect-modules
2917
runs-on: ubuntu-latest
30-
strategy:
31-
max-parallel: 1
32-
matrix:
33-
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
3418
steps:
3519
- uses: actions/checkout@v4
3620
- uses: actions/setup-go@v5
3721
with:
3822
go-version: 1.21.8
39-
- name: golangci-lint ${{ matrix.modules }}
23+
- name: golangci-lint
4024
uses: golangci/golangci-lint-action@v8
4125
with:
4226
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
4327
version: v2.1
4428

4529
# Optional: working directory, useful for monorepos
46-
working-directory: ${{ matrix.modules }}
30+
# working-directory: ${{ matrix.modules }}
4731

4832
# Optional: golangci-lint command line arguments.
4933
# args: --issues-exit-code=0

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ CLI_TARGET_STRINGS:=$(foreach oos,$(CLI_TARGET_OOS), $(foreach arch,$(ARCHS),${B
1111
DAEMON_TARGET_STRINGS:=$(foreach arch,$(ARCHS),${BIN_DIR}/rocketpool-daemon-linux-$(arch))
1212
TREEGEN_TARGET_STRINGS:=$(foreach arch,$(ARCHS),${BIN_DIR}/treegen-linux-$(arch))
1313

14-
MODULES:=$(foreach path,$(shell find . -maxdepth 1 -mindepth 1 -type d -not -path '*/.*' -not -name "bindings"),$(dir $(path)))
15-
MODULE_GLOBS:=$(foreach module,$(MODULES),$(module)...)
16-
1714
define rocketpool-cli-template
1815
.PHONY: ${BIN_DIR}/rocketpool-cli-$1-$2
1916
${BIN_DIR}/rocketpool-cli-$1-$2: ${bin_deps}
@@ -147,7 +144,7 @@ endif
147144

148145
.PHONY: test
149146
test:
150-
go test -test.timeout 20m $(MODULE_GLOBS)
147+
go test -test.timeout 20m $$(go list ./... | grep -v bindings)
151148

152149
.PHONY: clean
153150
clean:

0 commit comments

Comments
 (0)