Skip to content

ci: add matrix strategy builds #48

ci: add matrix strategy builds

ci: add matrix strategy builds #48

Workflow file for this run

name: build
on:
push:
branches: [ "main" ]
pull_request:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"
permissions:
contents: read
env:
GO_VERSION: '1.22.5'
jobs:
build:
name: build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: go build
run: go build -v ./...
- name: go test
run: go test -v ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
- name: run hours
run: |
go build .
./hours --dbpath=/var/tmp/throwaway-1.db report 3d -p
./hours --dbpath=/var/tmp/throwaway-2.db gen -y
./hours --dbpath=/var/tmp/throwaway-2.db report 3d -p