Skip to content

Commit

Permalink
feat(ci): add test, lint and release please jobs (#1)
Browse files Browse the repository at this point in the history
* feat(ci): add test step

* feat(ci):add lint and release please

Release-As: 0.1.0
  • Loading branch information
scottmckendry committed May 28, 2024
1 parent c554dca commit 2775c83
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI
on:
push:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Test
run: go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname

- name: Test Summary
uses: test-summary/action@v2
with:
paths: "unit-tests.xml"
if: always()
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
release:
name: Release
runs-on: ubuntu-latest
needs: [test, lint]
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.REPO_TOKEN }}
release-type: go

0 comments on commit 2775c83

Please sign in to comment.