generated from shoriwe/base-go-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: updated pipelines * fix: added unique uuid to consumer and producers (#23) * fix: added unique uuid to consumer and producers * fix: updated dependencies and go version * fix: added the ability to setup the consumer and producer names * fix: fixed test to reduce the random name generated
- Loading branch information
Showing
12 changed files
with
253 additions
and
234 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,28 @@ | ||
name: Coverage | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Build | ||
types: | ||
- completed | ||
|
||
permissions: read-all | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
go-version: "1.21" | ||
- name: Set up docker environment | ||
run: docker compose up -d | ||
|
||
- name: Clean | ||
run: go clean && go clean -cache | ||
- name: Test | ||
run: go test -coverpkg ./... -coverprofile coverage.txt -covermode atomic ./... | ||
|
||
run: go test -p 1 -count 1 -coverpkg ./... -coverprofile coverage.txt -covermode count ./... | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.txt | ||
fail_ci_if_error: true | ||
|
||
- name: Clean docker environment | ||
run: docker compose down --rmi all -v --remove-orphans |
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,37 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
versioning: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.latest_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: latest_version | ||
name: Latest version | ||
run: python version.py >> $GITHUB_OUTPUT | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
needs: | ||
- versioning | ||
outputs: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create-release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.versioning.outputs.version }} | ||
release_name: Release ${{ needs.versioning.outputs.version }} | ||
draft: false | ||
prerelease: false |
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,28 @@ | ||
name: Tagging | ||
|
||
on: | ||
push: | ||
branches: ["dev"] | ||
|
||
jobs: | ||
tagging: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup node 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: "npm" | ||
- name: Git Identity | ||
run: | | ||
git checkout dev | ||
git fetch --all --tags | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Antonio Donis" | ||
- name: Changelog | ||
run: 'npx standard-version --message "[ci skip] chore(release): %s"' | ||
- name: Push changes | ||
run: git push --follow-tags --force origin dev |
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,36 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: ["dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
- name: Clean | ||
run: go clean && go clean -cache | ||
- name: Build | ||
run: go build . | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
- name: Set up docker environment | ||
run: docker compose up -d | ||
- name: Clean | ||
run: go clean && go clean -cache | ||
- name: Test | ||
run: go test -p 1 -count 1 -v ./... | ||
- name: Clean docker environment | ||
run: docker compose down --rmi all -v --remove-orphans |
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
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
Oops, something went wrong.