Skip to content

Commit

Permalink
Merge pull request #50 from bilalcaliskan/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
bilalcaliskan authored Sep 6, 2022
2 parents 9e67c08 + c03240c commit 1ed2d84
Show file tree
Hide file tree
Showing 27 changed files with 478 additions and 252 deletions.
19 changes: 12 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

---
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
target-branch: "devel"
labels:
- "dependabot"
- "gomod"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "devel"
labels:
- "dependabot"
- "github-actions"
49 changes: 0 additions & 49 deletions .github/stale.yml

This file was deleted.

52 changes: 22 additions & 30 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,25 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# version: latest
version: v1.46.1

vet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: Vet
run: make vet
go-version-file: "go.mod"
- name: Lint code
run: make -s lint
- name: Clean downloaded binaries
run: make -s clean

ineffassign:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: Run Ineffassign
run: make ineffassign
go-version-file: "go.mod"
- name: Run fmt
run: make -s fmt
- name: Clean downloaded binaries
run: make -s clean

test:
# strategy:
Expand All @@ -55,9 +44,9 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version-file: "go.mod"
- name: Test
run: make test
run: make -s test

codeql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,14 +75,17 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version-file: "go.mod"
- name: Coverage Test
run: make coverage
run: make -s test-with-coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dproject.settings=build/ci/sonar-project.properties
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
Expand All @@ -106,11 +98,11 @@ jobs:
os: [ubuntu-latest, macos-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.17.x
- name: Checkout code
uses: actions/checkout@v3
go-version-file: "go.mod"
- name: Test
run: make build
run: make -s build
65 changes: 27 additions & 38 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,25 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# version: latest
version: v1.46.1

vet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: Vet
run: make vet
go-version-file: "go.mod"
- name: Lint code
run: make -s lint
- name: Clean downloaded binaries
run: make -s clean

ineffassign:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- name: Run Ineffassign
run: make ineffassign
go-version-file: "go.mod"
- name: Run fmt
run: make -s fmt
- name: Clean downloaded binaries
run: make -s clean

test:
# strategy:
Expand All @@ -54,18 +43,17 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version-file: "go.mod"
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: make test
run: make -s test

codeql:
runs-on: ubuntu-latest
needs:
- lint
- vet
- ineffassign
- fmt
- test
strategy:
fail-fast: false
Expand All @@ -87,8 +75,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- lint
- vet
- ineffassign
- fmt
- test
steps:
- uses: actions/checkout@v3
Expand All @@ -97,14 +84,17 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version-file: "go.mod"
- name: Coverage Test
run: make coverage
run: make -s test-with-coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dproject.settings=build/ci/sonar-project.properties
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
Expand All @@ -114,22 +104,21 @@ jobs:
build:
needs:
- lint
- vet
- ineffassign
- fmt
- test
strategy:
matrix:
os: [ubuntu-latest, macos-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.17.x
- name: Checkout code
uses: actions/checkout@v3
go-version-file: "go.mod"
- name: Test
run: make build
run: make -s build

tag:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -175,12 +164,12 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version-file: "go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release --rm-dist --config build/package/.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * 0"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This bot triages issues and PRs according to the following rules:
- After 60d of inactivity, lifecycle/stale is applied.
- After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the issue is closed.
You can:
- Make a comment to remove the stale label and show your support. The 60 days reset.
- If an issue has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening"
stale-pr-message: "This bot triages issues and PRs according to the following rules:
- After 60d of inactivity, lifecycle/stale is applied.
- After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the PR is closed.
You can:
- Make a comment to remove the stale label and show your support. The 60 days reset.
- If a PR has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening."
days-before-stale: 60
days-before-close: 30
stale-issue-label: 'lifecycle/stale'
stale-pr-label: 'lifecycle/stale'
exempt-issue-label: 'lifecycle/frozen'
exempt-pr-label: 'lifecycle/frozen'
close-issue-label: 'lifecycle/rotten'
close-pr-label: 'lifecycle/rotten'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/
bin/
.bin
vendor/


Expand Down
6 changes: 0 additions & 6 deletions Dockerfile.goreleaser

This file was deleted.

Loading

0 comments on commit 1ed2d84

Please sign in to comment.