Skip to content

Commit

Permalink
Run only the linter
Browse files Browse the repository at this point in the history
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
  • Loading branch information
ulucinar committed Mar 1, 2024
1 parent 97cd01e commit eea62d0
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,44 @@ on:
pull_request: {}
workflow_dispatch: {}

env:
# Common versions
GO_VERSION: '1.21'
GOLANGCI_VERSION: 'v1.55.2'
DOCKER_BUILDX_VERSION: 'v0.8.2'

jobs:
ci:
uses: ulucinar/uptest/.github/workflows/provider-ci.yml@ci-disk-cleanup
with:
go-version: 1.21
secrets:
UPBOUND_MARKETPLACE_PUSH_ROBOT_USR: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_USR }}
UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW: ${{ secrets.UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW }}
lint:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
submodules: true

- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
with:
go-version: ${{ env.GO_VERSION }}

- name: Find the Go Build Cache
id: go
run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT

- name: Cache the Go Build Cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
path: ${{ steps.go.outputs.cache }}
key: ${{ runner.os }}-build-lint-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-build-lint-

- name: Vendor Dependencies
run: make vendor vendor.check

# We could run 'make lint' but we prefer this action because it leaves
# 'annotations' (i.e. it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
version: ${{ env.GOLANGCI_VERSION }}

0 comments on commit eea62d0

Please sign in to comment.