forked from bountylabs/go-fasttext
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring first part of the library
Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev>
- Loading branch information
1 parent
ba54e0c
commit 7f45376
Showing
43 changed files
with
479 additions
and
5,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 'Create Release' | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Get Tag | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: olegtarasov/get-tag@v2.1.3 | ||
id: version_tag | ||
with: | ||
tagRegex: "v(.*)" | ||
- name: Upload Release Asset | ||
uses: softprops/action-gh-release@v1 | ||
id: release | ||
with: | ||
name: "v${{ steps.version_tag.outputs.tag }}" | ||
tag_name: "v${{ steps.version_tag.outputs.tag }}" | ||
generate_release_notes: true | ||
append_body: true | ||
prerelease: false | ||
fail_on_unmatched_files: true | ||
- name: "Generate release changelog" | ||
uses: heinrichreimer/action-github-changelog-generator@v2.3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
author: true | ||
releaseUrl: ${{ steps.release.outputs.url }} | ||
issues: false | ||
pullRequests: true | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Update CHANGELOG.md" | ||
branch: master | ||
commit_options: '--no-verify --signoff' | ||
file_pattern: CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: [push, pull_request] | ||
name: Security | ||
jobs: | ||
Gosec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Run Gosec | ||
uses: securego/gosec@master | ||
with: | ||
args: ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
name: 'Tests' | ||
name: 'Testing' | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
jobs: | ||
tests: | ||
test: | ||
strategy: | ||
matrix: | ||
go: [ '1.20' ] | ||
runs-on: ubuntu-latest | ||
os: ['ubuntu-latest'] | ||
go: [ '1.22' ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-tests-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-tests-${{ hashFiles('**/go.sum') }} | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: Set up gotestfmt | ||
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Run tests | ||
run: go test -covermode=atomic -coverprofile=coverage.txt -timeout 5m -json -v ./... | gotestfmt -showteststatus | ||
run: | | ||
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | ||
task test | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: nano-interactive/go-amqp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version: '3' | ||
|
||
tasks: | ||
fmt: | ||
cmds: | ||
- gofumpt -l -w . | ||
lint: | ||
cmds: | ||
- golangci-lint run --color "always" -v -j 8 | ||
sec: | ||
cmds: | ||
- gosec ./... | ||
tidy: | ||
cmds: | ||
- rm -f go.sum | ||
- go mod tidy | ||
update: | ||
cmds: | ||
- go get -u ./... # Updates regular packages | ||
- go get -u -t ./... # Updates Test packages | ||
cli-tools: | ||
cmds: | ||
- go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | ||
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
- go install github.com/securego/gosec/v2/cmd/gosec@latest | ||
- go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest | ||
- go install github.com/ramya-rao-a/go-outline@latest | ||
- go install github.com/cweill/gotests/gotests@latest | ||
- go install github.com/fatih/gomodifytags@latest | ||
- go install github.com/daixiang0/gci@latest | ||
- go install github.com/josharian/impl@latest | ||
- go install github.com/haya14busa/goplay/cmd/goplay@latest | ||
- go install github.com/go-delve/delve/cmd/dlv@latest | ||
- go install mvdan.cc/gofumpt@latest | ||
- go install github.com/swaggo/swag/cmd/swag@latest | ||
- go install github.com/cosmtrek/air@latest | ||
- go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 | ||
- go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 | ||
test: | ||
cmds: | ||
- go test -covermode=atomic -race -coverprofile=coverage.txt -timeout 5m -json -v ./... | gotestfmt -showteststatus | ||
env: | ||
GOMAXPROCS: 4 |
Oops, something went wrong.