Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: GitHub Action cleanup & run tests on valkey #6

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading