Skip to content

build(deps): Bump the all-go-mod-patch-and-minor group across 1 directory with 4 updates #134

build(deps): Bump the all-go-mod-patch-and-minor group across 1 directory with 4 updates

build(deps): Bump the all-go-mod-patch-and-minor group across 1 directory with 4 updates #134

Workflow file for this run

# Copyright 2021-2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: checks
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
- name: Run unit tests
run: devbox run -- make test
lint:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
- name: Export golang and golangci-lint versions
id: versions
run: |
echo "GOLANGCI_LINT_VERSION=v$(devbox run -- golangci-lint version --format short)" >>$GITHUB_OUTPUT
echo "GO_VERSION=$(devbox run -- go version | grep -o "[[:digit:]]\+.[[:digit:]]\+\(.[[:digit:]]\+\)\?")" >>$GITHUB_OUTPUT
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
fail_on_error: true
reporter: github-pr-review
golangci_lint_version: ${{ steps.versions.outputs.GOLANGCI_LINT_VERSION }}
go_version: ${{ steps.versions.outputs.GO_VERSION }}
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: true
- name: Go cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up pre-commit cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: devbox run -- make pre-commit
env:
SKIP: no-commit-to-branch,golangci-lint,actionlint-system