-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ests feat: add separate CI worflows to run library tests and linting
- Loading branch information
Showing
3 changed files
with
73 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: ci-rebac-admin-backend | ||
run-name: CI (rebac-admin) for ${{ github.sha }} on ${{ github.ref_name }} | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "feature-rebac-admin-ui-backend" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
checks: write | ||
|
||
jobs: | ||
lint: | ||
name: Perform linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
name: Checkout repo | ||
|
||
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 | ||
name: Setup Go version | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- uses: golangci/golangci-lint-action@v3 | ||
name: Perform linting and annotate code | ||
with: | ||
version: latest | ||
working-directory: ./rebac-admin-backend | ||
only-new-issues: true | ||
|
||
unit-test: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Build and test Go code | ||
working-directory: ./rebac-admin-backend | ||
run: make ARGS="-count=1" test-coverage | ||
|
||
|
||
- uses: codecov/codecov-action@c4cf8a4f03f0ac8585acb7c1b7ce3460ec15782f # v4 | ||
with: | ||
files: ./rebac-admin-backend/coverage.out | ||
|
||
- name: Upload Go test results | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | ||
with: | ||
name: Go-results | ||
path: ./rebac-admin-backend/test.json |
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