Skip to content

Commit

Permalink
add tests to the CI/CD tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NagaTulasi committed Sep 19, 2024
1 parent 6ab8d2b commit 5058b02
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
pull_request:
push:
branches:
- main

concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true

jobs:
tests:
name: Tests and code coverage
runs-on: ubuntu-latest
steps:
- name: Install GO
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: Checkout code
uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: run all tests and generate coverage
run: go test -v -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic `go list ./... | grep -v simapp`
if: env.GIT_DIFF
- name: Upload codecov report
uses: codecov/[email protected]
with:
file: coverage.txt
if: env.GIT_DIFF

0 comments on commit 5058b02

Please sign in to comment.