Skip to content

Commit

Permalink
Merge pull request #66 from Jmainguy/reusable
Browse files Browse the repository at this point in the history
chore: use reusable workflow
  • Loading branch information
Jmainguy authored Sep 16, 2024
2 parents 5e153a4 + 68754df commit 7e838e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 99 deletions.
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.

0 comments on commit 7e838e6

Please sign in to comment.