Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

ADHOC: Lint the code, then format it #36

ADHOC: Lint the code, then format it

ADHOC: Lint the code, then format it #36

Workflow file for this run

name: Test
on:
pull_request:
paths:
- .github/workflows/test.yml
- go.mod
- go.sum
- '**/*.go'
push:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.23.4
- name: Install dependencies
run: go mod tidy
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
- name: Build
run: make build
- name: Test
run: make test
- name: Run (Linux and MacOS)
if: ${{ runner.os != 'Windows' }}
shell: bash
run: |
cp ./homekeeper ${{ runner.temp }}
cd ${{ runner.temp }}
./homekeeper init --debug --git https://github.com/retiman/dotfiles.git
- name: Run (Windows)
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
Copy-Item .\homekeeper.exe ${{ runner.temp }}
Set-Location ${{ runner.temp }}
.\homekeeper.exe init --debug --git https://github.com/retiman/dotfiles.git