Skip to content

Commit

Permalink
fix: add separate test action for raft
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Aug 22, 2024
1 parent 9d780f4 commit b48a7ed
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
- "!node/cmd/delegator/**"
- "!node/cmd/api/**"
- "!node/cmd/sentinel/**"
- "!node/pkg/raft/**"
workflow_dispatch:

jobs:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/raft.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "raft test"

on:
push:
branches-ignore:
- "master"
paths:
- "node/pkg/raft/**"
workflow_dispatch:

jobs:
core-build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 15

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orakl-test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.3"
check-latest: true
cache-dependency-path: |
./node/go.sum
- name: Install dependencies
run: |
cd ./node
go mod tidy
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run test
run: |
cd ./node
task local:test-raft
env:
ENCRYPT_PASSWORD: "anything"

0 comments on commit b48a7ed

Please sign in to comment.