Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving to Task based build system. #122

Merged
merged 4 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod

- name: Setup cache
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: Run task
run: go run github.com/go-task/task/v3/cmd/[email protected]

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
48 changes: 0 additions & 48 deletions .github/workflows/go.yml

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/cinar/checker

go 1.20
go 1.22
28 changes: 28 additions & 0 deletions taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3'
output: 'prefixed'

tasks:
default:
cmds:
- task: fmt
- task: lint
- task: test

action:
deps: [lint, test]

fmt:
cmds:
- go fix ./...

lint:
cmds:
- go vet ./...
- go run github.com/securego/gosec/v2/cmd/[email protected] ./...
- go run honnef.co/go/tools/cmd/[email protected] ./...
- go run github.com/mgechev/[email protected] -config=revive.toml ./...

test:
cmds:
- go test -cover -coverprofile=coverage.out ./...

Loading