-
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.
- Loading branch information
Showing
5 changed files
with
109 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 'common-ci' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
module: | ||
required: false | ||
type: string | ||
default: "." | ||
go_version: | ||
required: false | ||
type: string | ||
default: "1.20.0" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ inputs.go_version }} | ||
- name: Clean cache | ||
working-directory: ${{ inputs.module }} | ||
run: go clean -modcache && go clean -testcache && go mod tidy | ||
- name: Install dependencies | ||
working-directory: ${{ inputs.module }} | ||
run: go mod download | ||
- name: Run tests | ||
working-directory: ${{ inputs.module }} | ||
run: go test -v -race -failfast -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... | ||
- name: Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: false | ||
flags: ${{ inputs.module }} | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ inputs.go_version }} | ||
- name: Install lint | ||
working-directory: ${{ inputs.module }} | ||
run: go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
- name: Run lint | ||
working-directory: ${{ inputs.module }} | ||
run: golangci-lint run |
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,22 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
command: manifest | ||
monorepo-tags: true | ||
separate-pull-requests: true | ||
release-type: "go" | ||
tag-separator: "/" |
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 @@ | ||
{} |
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 +1,19 @@ | ||
# yokai-contrib | ||
# Yokai Contrib | ||
|
||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
[![Go version](https://img.shields.io/badge/Go-≥1.20-blue)](https://go.dev/) | ||
|
||
> Contrib modules repository for the [Yokai](https://github.com/ankorstore/yokai) framework. | ||
## Modules | ||
|
||
| Module | Description | | ||
|--------|-------------| | ||
|
||
|
||
## Contributing | ||
|
||
This repository uses [release-please](https://github.com/googleapis/release-please) to automate Yokai's contrib modules release process. | ||
|
||
> [!IMPORTANT] | ||
> You must provide [atomic](https://en.wikipedia.org/wiki/Atomic_commit#Revision_control) and [conventional](https://www.conventionalcommits.org/en/v1.0.0/) commits, as the release process relies on them to determine the version to release and to generate the release notes. |
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,4 @@ | ||
{ | ||
"separate-pull-requests": true, | ||
"packages": {} | ||
} |