mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
ci: Implement comprehensive CI/CD workflow with build, unit, race, and coverage tests
This commit is contained in:
@@ -6,6 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-builds:
|
test-builds:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Run Build Tests
|
name: Run Build Tests
|
||||||
steps:
|
steps:
|
||||||
@@ -28,7 +29,7 @@ jobs:
|
|||||||
run: make build-motr
|
run: make build-motr
|
||||||
|
|
||||||
test-unit:
|
test-unit:
|
||||||
needs: [test-builds]
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Run Unit Tests
|
name: Run Unit Tests
|
||||||
steps:
|
steps:
|
||||||
@@ -47,7 +48,7 @@ jobs:
|
|||||||
|
|
||||||
test-race:
|
test-race:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-builds]
|
if: github.event_name == 'merge_group'
|
||||||
name: Run Race Tests
|
name: Run Race Tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
@@ -66,9 +67,8 @@ jobs:
|
|||||||
|
|
||||||
test-cover:
|
test-cover:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-builds]
|
if: github.event_name == 'merge_group'
|
||||||
name: Run Coverage Tests
|
name: Run Coverage Tests
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -85,7 +85,6 @@ jobs:
|
|||||||
|
|
||||||
goreleaser-check:
|
goreleaser-check:
|
||||||
if: github.event_name == 'merge_group'
|
if: github.event_name == 'merge_group'
|
||||||
needs: [test-unit]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check GoReleaser Config
|
name: Check GoReleaser Config
|
||||||
steps:
|
steps:
|
||||||
@@ -102,7 +101,7 @@ jobs:
|
|||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Check GoReleaser Config
|
- name: Check GoReleaser Config
|
||||||
uses: goreleaser/goreleaser-action@v5
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser-pro
|
distribution: goreleaser-pro
|
||||||
version: latest
|
version: latest
|
||||||
@@ -112,7 +111,7 @@ jobs:
|
|||||||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
|
|
||||||
- name: GoReleaser Dry Run
|
- name: GoReleaser Dry Run
|
||||||
uses: goreleaser/goreleaser-action@v5
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser-pro
|
distribution: goreleaser-pro
|
||||||
version: latest
|
version: latest
|
||||||
|
|||||||
Reference in New Issue
Block a user