Skip to content

Commit

Permalink
test.yml: run test in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Jan 14, 2025
1 parent 17662c1 commit 150dc08
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
flags: |
-japecheck.types=false
test-sqlite: # Run all tests against SQLite
needs: analyze
uses: SiaFoundation/workflows/.github/workflows/go-test.yml@master
secrets: inherit

test-mysql: # Run all tests against MySQL
needs: analyze
runs-on: ubuntu-latest
Expand All @@ -65,7 +60,25 @@ jobs:
RENTERD_DB_USER: root
RENTERD_DB_PASSWORD: test
with:
go-test-args: "-race;-timeout=20m;-tags=netgo"
go-test-args: "-failfast;-race;-timeout=20m;-tags=netgo;-run=TestV1ToV2;-count=100"

test-sqlite: # Run all tests against SQLite
needs: analyze
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.22", "1.23"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Test
uses: SiaFoundation/workflows/.github/actions/go-test@master
with:
go-test-args: "-failfast;-race;-timeout=20m;-tags=netgo;-run=TestV1ToV2;-count=100"

test-sqlite-v2: # Run all tests against SQLite
needs: analyze
Expand All @@ -83,7 +96,7 @@ jobs:
- name: Test
uses: SiaFoundation/workflows/.github/actions/go-test@master
with:
go-test-args: "-race;-timeout=20m;-tags=netgo,v2"
go-test-args: "-failfast;-race;-timeout=20m;-tags=netgo,v2;-run=TestV1ToV2;-count=100"

test-mysql-v2: # Run all tests against MySQL
needs: analyze
Expand Down Expand Up @@ -111,7 +124,7 @@ jobs:
RENTERD_DB_USER: root
RENTERD_DB_PASSWORD: test
with:
go-test-args: "-race;-timeout=20m;-tags=netgo,v2"
go-test-args: "-failfast;-race;-timeout=20m;-tags=netgo,v2;-run=TestV1ToV2;-count=100"

success: # Use in branch rulesets to ensure all matrix jobs completed successfully
needs: [test-sqlite, test-mysql, test-sqlite-v2, test-mysql-v2]
Expand Down

0 comments on commit 150dc08

Please sign in to comment.