Skip to content

Commit

Permalink
chore(main): Init repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkinox committed Feb 19, 2024
1 parent 860255f commit 4278ccd
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/common-ci.yml
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
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
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: "/"
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
20 changes: 19 additions & 1 deletion README.md
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.
4 changes: 4 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"separate-pull-requests": true,
"packages": {}
}

0 comments on commit 4278ccd

Please sign in to comment.