Skip to content

build(deps): Upgrade commit based deps #1091

build(deps): Upgrade commit based deps

build(deps): Upgrade commit based deps #1091

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
permissions:
checks: write
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v3
# Setup github authentication to ensure Github's rate limits are not hit.
- name: Configure nix GitHub access-tokens
run: |
mkdir -p ~/.config/nix
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.4.0
with:
enable-cache: true
env:
NIX_USER_COUNT: 4
- name: Run unit tests
run: devbox run -- make test
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "Unit test results"
files: |
junit-report.xml
e2e-test:
runs-on: ubuntu-22.04
permissions:
checks: write
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Setup github authentication to ensure Github's rate limits are not hit.
- name: Configure nix GitHub access-tokens
run: |
mkdir -p ~/.config/nix
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.4.0
with:
enable-cache: true
env:
NIX_USER_COUNT: 4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Run e2e tests
run: devbox run -- make e2e-test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "e2e test results"
files: |
junit-e2e.xml
lint:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
# Setup github authentication to ensure Github's rate limits are not hit.
- name: Configure nix GitHub access-tokens
run: |
mkdir -p ~/.config/nix
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.4.0
with:
enable-cache: true
env:
NIX_USER_COUNT: 4
- name: Export golang and golangci-lint versions
run: |
echo "GOLANGCI_LINT_VERSION=v$(devbox run -- golangci-lint version --format short)" >>$GITHUB_ENV
echo "GO_VERSION=$(devbox run -- go version | grep -o "[[:digit:]]\+.[[:digit:]]\+\(.[[:digit:]]\+\)\?")" >>$GITHUB_ENV
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
fail_on_error: true
reporter: github-pr-review
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
go_version: ${{ env.GO_VERSION }}
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
# Setup github authentication to ensure Github's rate limits are not hit.
- name: Configure nix GitHub access-tokens
run: |
mkdir -p ~/.config/nix
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.4.0
with:
enable-cache: true
env:
NIX_USER_COUNT: 4
- name: Set up pre-commit cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: devbox run -- make pre-commit
env:
SKIP: no-commit-to-branch,golangci-lint