From 2772e568d5c6d18ab7f8f631d3bc055d792b9c1b Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 7 Oct 2024 21:31:56 -0400 Subject: [PATCH] feat: add GitHub Actions workflow for running tests --- .github/workflows/run-tests.yml | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 000000000..af3c36b0f --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,60 @@ +name: Run Tests + +on: + push: + branches: + - feature/* + +jobs: + test-unit: + runs-on: ubuntu-latest + name: Run Unit Tests + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: onsonr/sonr + fetch-depth: 0 + fetch-tags: true + + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + check-latest: true + - run: make test-unit + + test-race: + runs-on: ubuntu-latest + name: Run Race Tests + continue-on-error: true + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: onsonr/sonr + fetch-depth: 0 + fetch-tags: true + + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + check-latest: true + - run: make test-race + + test-cover: + runs-on: ubuntu-latest + name: Run Coverage Tests + continue-on-error: true + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: onsonr/sonr + fetch-depth: 0 + fetch-tags: true + + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + check-latest: true + - run: make test-cover