Skip to content

Commit

Permalink
chore: GitHub Action cleanup & run tests on valkey (#6)
Browse files Browse the repository at this point in the history
* chore: GitHub Action cleanup & run tests on valkey

Signed-off-by: Matteo Collina <[email protected]>

* fixup

Signed-off-by: Matteo Collina <[email protected]>

* fixup

Signed-off-by: Matteo Collina <[email protected]>

---------

Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina authored Jun 14, 2024
1 parent 2733aee commit c9eb012
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 49 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

55 changes: 38 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
name: test

on:
workflow_call:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'

jobs:
test:
test-redis:
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: true
matrix:
node: [12.x, 14.x, 16.x, 18.x, 20.x]
node: [18.x, 20.x, 22.x]
steps:
- name: Git checkout
uses: actions/checkout@v2
Expand All @@ -27,13 +36,6 @@ jobs:
- run: npm run build
- run: npm run test:tsd
- run: npm run test:cov || npm run test:cov || npm run test:cov
- name: Coveralls
if: matrix.node == '20.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{matrix.node}}
parallel: true

test-cluster:
runs-on: ubuntu-latest
Expand All @@ -42,12 +44,31 @@ jobs:
- name: Build and test cluster
run: bash test/cluster/docker/main.sh

code-coverage:
needs: test
test-valkey:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node: [18.x, 20.x, 22.x]

services:
valkey:
image: valkey/valkey:latest
ports:
# Opens tcp port 6379 on the host and service container
- 6379:6379

steps:
- name: Coveralls
uses: coverallsapp/github-action@master
- name: Git checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
node-version: ${{ matrix.node }}

- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run test:tsd
- run: npm run test:cov || npm run test:cov || npm run test:cov
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"format": "prettier --write \"{,!(node_modules)/**/}*.{js,ts}\"",
"format-check": "prettier --check \"{,!(node_modules)/**/}*.{js,ts}\"",
"build": "rm -rf built && tsc",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"start-valkey": "docker run -p 6379:6379 valkey/valkey"
},
"repository": {
"type": "git",
"url": "git://github.com/mcollina/iovalkey.git"
"url": "git://github.com/valkey/iovalkey.git"
},
"keywords": [
"redis",
Expand Down

0 comments on commit c9eb012

Please sign in to comment.