Skip to content

Commit

Permalink
Fix ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
raynaudoe committed Aug 30, 2024
1 parent 2ea27e8 commit b438d03
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Build and Test
name: Build
on:
pull_request:
merge_group:
push:
branches:
- main
- release/**
- cp-main
permissions:
contents: read

Expand All @@ -20,17 +18,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: "1.23.0"
- name: Build
run: make build

test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
- name: Test
run: make test
run: make
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
pull_request:
push:
branches:
- main
- release/**
- cp-main

permissions:
contents: read
Expand All @@ -16,6 +15,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: "1.23.0"
- name: Run Linter
run: make lint
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
WALLET_BIN := build/wallet
GOLANGCI_VERSION := v1.60.3

.PHONY: demo run clean

.DEFAULT_GOAL := build
.DEFAULT_GOAL := build-wallet

# Build the wallet command
build-wallet:
Expand All @@ -15,4 +16,22 @@ demo:

# Clean built binaries
clean:
rm -f $(WALLET_BIN)
rm -f $(WALLET_BIN)


# Install golangci-lint
lint-install:
@echo "--> Installing golangci-lint $(GOLANGCI_VERSION)"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_VERSION)

# Run golangci-lint
lint:
@echo "--> Running linter"
$(MAKE) lint-install
@golangci-lint run --timeout=15m

# Run golangci-lint and fix
lint-fix:
@echo "--> Running linter with fix"
$(MAKE) lint-install
@golangci-lint run --fix

0 comments on commit b438d03

Please sign in to comment.