Skip to content

chore(deps): update all non-major dependencies #863

chore(deps): update all non-major dependencies

chore(deps): update all non-major dependencies #863

Workflow file for this run

---
# based on https://github.com/mvdan/github-actions-golang
name: CI
on:
pull_request:
branches: ["main"]
paths-ignore:
- "docs/**"
- "config/version.txt"
- "README.md"
- "nix/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
# cache go modules
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run linting
if: matrix.os == 'ubuntu-latest'
run: make lint
- name: Run unittest
if: matrix.os == 'ubuntu-latest'
run: make test-coverage
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v2
if: matrix.os == 'ubuntu-latest'
with:
green: 80
filename: out/coverage.out
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v14
if: matrix.os == 'ubuntu-latest'
id: verify-changed-files-coverage
with:
files: README.md
- name: Commit changes
if: steps.verify-changed-files-coverage.outputs.files_changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore(docs): update coverage badge"
- name: Run Vulnerability detection using govulncheck
if: matrix.os == 'ubuntu-latest'
run: make govulncheck
- name: Build package
run: make build
- name: Execute build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: ./out/bin/gt --help
- name: Execute build
if: matrix.os == 'windows-latest'
run: ./out/bin/gt.exe --help
- name: Create a test project & test it
run: |
make testing-project-default
make -C testing-project ci
make -C testing-project all
- name: Test generate projects
run: make testing-project-ci
- name: Run generate
if: matrix.os == 'ubuntu-latest'
run: make generate
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v14
if: matrix.os == 'ubuntu-latest'
id: verify-changed-files-generate
with:
files: |
nix/gomod2nix.toml
docs/options.md
- name: Commit changes
if: steps.verify-changed-files-generate.outputs.files_changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add nix/gomod2nix.toml docs/options.md
git commit -m "chore: regenerate files"
- name: Push changes
if: steps.verify-changed-files-coverage.outputs.files_changed == 'true' || steps.verify-changed-files-generate.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}