Skip to content

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

chore(deps): update all non-major dependencies

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

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@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: "^1.20.6"
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
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@v16
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: 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@v16
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: ${{ secrets.SIT_BOT_PAT }}
branch: ${{ github.head_ref }}