Skip to content

fix: use correct config file path #1914

fix: use correct config file path

fix: use correct config file path #1914

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"
paths:
- "**.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/ci.yaml"
pull_request:
types:
- opened
- reopened # new commits are pushed to the branch that the PR is based on
- synchronize # new commits are pushed to the branch that the PR is based on
- ready_for_review # PR is ready for review
paths:
- "**.go"
- "go.mod"
- "go.sum"
- "Makefile"
- ".github/workflows/ci.yaml"
env:
GO_VERSION: "1.25"
jobs:
# Spell check
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Codespell
uses: codespell-project/actions-codespell@v2
# Lint Go code
golint:
name: Go Linter
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Check formatting (go fmt)
run: |
go fmt ./...
# Fail if formatting changed any files
git diff --exit-code || (echo "Go files are not formatted. Please run 'go fmt ./...'" && exit 1)
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.5.0
args: --timeout=10m
# Test Go code on multiple platforms
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - windows-latest
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
if: runner.os != 'Windows'
run: |
make bin
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
go build -o .\.local\bin\dagu.exe .\cmd
- name: Test
if: runner.os != 'Windows'
run: |
make test-coverage
- name: Test (Windows)
if: runner.os == 'Windows'
run: |
go test -v -race .\...
- name: Upload coverage
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}