Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
feat: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jul 2, 2023
1 parent bd22138 commit 5df7fac
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 25 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: If you find an issue, please let us know.
title: ''
labels: ''
---

<!--
Thank you in advance for helping us to improve Berjis!
Please read through the template below and answer all relevant questions.
Your additional work here is greatly appreciated and will help us respond as quickly as possible.
-->

## Description

> Provide a clear and concise description of the issue, including what you expected to happen.
### How To Reproduce

> Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent.
### What Happened

> What actually happened including any error log or so
### Expected Behavior

> What were you expecting
### Extra

> any extra information you think is relevant to issue
### Environment

- **Operation System:**
- **Go Version:**
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature request
about: Any new functionality for Berjis.
title: ''
labels: ''
---

<!--
Thank you in advance for helping us to improve Berjis!
Please read through the template below and answer all relevant questions.
Your additional work here is greatly appreciated and will help us respond as quickly as possible.
-->

## Describe the problem you'd like to have solved

> A clear and concise description of what the problem is.
### Describe the ideal solution

> A clear and concise description of what you want to happen.
### Alternatives and current work-around

> A clear and concise description of any alternatives you've considered or any work-around that are currently in place.
### Additional context

> Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

## Description

Briefly describe the changes introduced by this pull request.

## Related issue(s)

If this Pull Request is related to an issue, mention it here.
29 changes: 29 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint and format check

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
linting:
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.5

- name: Checkout code
uses: actions/checkout@v3

- name: Installing golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

- name: Formatting and linting the project
run: make check
29 changes: 29 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit testing

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Unit tests
run: go test -v ./...
25 changes: 0 additions & 25 deletions .github/workflows/tests.yml

This file was deleted.

19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
check:
golangci-lint run \
--timeout=20m0s \
--enable=gofmt \
--enable=unconvert \
--enable=unparam \
--enable=asciicheck \
--enable=misspell \
--enable=revive \
--enable=decorder \
--enable=reassign \
--enable=usestdlibvars \
--enable=nilerr \
--enable=gosec \
--enable=exportloopref \
--enable=whitespace \
--enable=goimports \
--enable=gocyclo \
--enable=lll

0 comments on commit 5df7fac

Please sign in to comment.