Skip to content

Commit

Permalink
fix: redis lock improvments && update CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Oct 20, 2022
1 parent e426e61 commit e1da289
Show file tree
Hide file tree
Showing 8 changed files with 2,848 additions and 22 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true # optional (default = false)
integrations:
redis-lock:
container:
image: ghcr.io/aldor007/mort-base:latest
credentials:
Expand Down Expand Up @@ -63,11 +63,44 @@ jobs:
redis-version: 6.2
- name: Run the integrations tests
run: |
make run-test-server &
make run-test-server-redis &
pid=$!
sleep 13 && curl --retry 20 --retry-delay 5 -s -o /dev/null "http://localhost:8091" || true && sleep 5 && npm run tests
kill -9 $pid
env:
MORT_HOST: localhost
MORT_PORT: 8091
CI: true
memory-lock:
container:
image: ghcr.io/aldor007/mort-base:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GHR_TOKEN }}
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Install Node JS
uses: actions/setup-node@v1
with:
node-version: 17

- name: Install npm deps
run: npm install

- name: Install go deps
run: go mod download

- name: Run the integrations tests
run: |
make run-test-server &
pid=$!
sleep 13 && curl --retry 20 --retry-delay 5 -s -o /dev/null "http://localhost:8091" || true && sleep 5 && npm run tests
kill -9 $pid
env:
MORT_HOST: localhost
MORT_PORT: 8091
CI: true
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ run-test-server:
scripts/prepare-for-tests.sh
go run cmd/mort/mort.go -config ./tests-int/mort.yml

run-test-server-redis:
scripts/prepare-for-tests.sh
go run cmd/mort/mort.go -config ./tests-int/mort-redis.yml

clean-prof:
find . -name ".test" -depth -exec rm {} \;
find . -name ".cpu" -depth -exec rm {} \;
Expand Down
Loading

0 comments on commit e1da289

Please sign in to comment.