Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use reusable workflow #66

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 5 additions & 58 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,8 @@
name: Call Reusable Golang CI Workflow

on:
push:
push:

name: push
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Get Build Tools
run: |
go install github.com/ory/go-acc@latest

- name: git checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Install dependencies
run: |
go mod download

- name: Run Unit tests
run: |
go-acc .

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.txt

build:
name: Lint and build
runs-on: ubuntu-latest
steps:
- name: install go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: git checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: install lint
run: GO111MODULE=off go get golang.org/x/lint/golint

- name: run golint and go fmt
run: ./tests/fmtlint.sh

- name: go build
run: go build
golang-ci:
uses: Jmainguy/golang-workflows/.github/workflows/[email protected]
33 changes: 4 additions & 29 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release-please
name: Call Reusable Golang Release-Please Workflow

on:
push:
Expand All @@ -7,31 +7,6 @@ on:

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
release-type: go

release:
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: Jmainguy/golang-workflows/.github/workflows/[email protected]
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 0 additions & 12 deletions tests/fmtlint.sh

This file was deleted.

Loading