generated from devnw/oss-template
-
-
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.
feat: add the new workflows and remove codecov badge
- Loading branch information
1 parent
ee8c9c5
commit 6f59563
Showing
6 changed files
with
66 additions
and
126 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
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,64 +1,12 @@ | ||
name: Build & Test | ||
name: Lint, Build & Test | ||
|
||
# this is triggered on push to the repository | ||
on: [push, pull_request] | ||
|
||
env: | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_PAT }} | ||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
strategy: | ||
matrix: | ||
go-version: [1.18.x] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
fail-fast: true | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
stable: false | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Build | ||
run: go build ./... | ||
test: | ||
name: "Unit Tests" | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
go-version: [1.18.x] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
fail-fast: true | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
stable: false | ||
- name: Test | ||
run: go test -failfast ./... -race -coverprofile=coverage.txt -covermode=atomic | ||
- name: Push Coverage to codecov.io | ||
uses: codecov/codecov-action@v3.0.0 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.txt | ||
pre-release: | ||
name: "Pre Release" | ||
if: github.event_name != 'pull_request' | ||
runs-on: "ubuntu-latest" | ||
needs: [build, test] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "dev" | ||
prerelease: true | ||
title: "Development Build" | ||
files: | | ||
LICENSE | ||
lint-build-test: | ||
name: Lint, Build & Test | ||
uses: spyderorg/workflows/.github/workflows/make-build-nix.yml@main | ||
secrets: inherit # pragma: allowlist secret |
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,47 @@ | ||
# Code generated by gitStream GitHub app - DO NOT EDIT | ||
|
||
name: gitStream workflow automation | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
client_payload: | ||
description: The Client payload | ||
required: true | ||
full_repository: | ||
description: the repository name include the owner in `owner/repo_name` format | ||
required: true | ||
head_ref: | ||
description: the head sha | ||
required: true | ||
base_ref: | ||
description: the base ref | ||
required: true | ||
installation_id: | ||
description: the installation id | ||
required: false | ||
resolver_url: | ||
description: the resolver url to pass results to | ||
required: true | ||
resolver_token: | ||
description: Optional resolver token for resolver service | ||
required: false | ||
default: '' | ||
|
||
jobs: | ||
gitStream: | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
name: gitStream workflow automation | ||
steps: | ||
- name: Evaluate Rules | ||
uses: linear-b/gitstream-github-action@v1 | ||
id: rules-engine | ||
with: | ||
full_repository: ${{ github.event.inputs.full_repository }} | ||
head_ref: ${{ github.event.inputs.head_ref }} | ||
base_ref: ${{ github.event.inputs.base_ref }} | ||
client_payload: ${{ github.event.inputs.client_payload }} | ||
installation_id: ${{ github.event.inputs.installation_id }} | ||
resolver_url: ${{ github.event.inputs.resolver_url }} | ||
resolver_token: ${{ github.event.inputs.resolver_token }} |
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