Merge pull request #238 from amjedidiah/patch-1 #408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
test-all: | |
name: Test All | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18, 20] | |
services: | |
redis: | |
image: redis/redis-stack-server:latest | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli PING" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update npm | |
run: npm install --global npm | |
if: ${{ matrix.node-version <= 14 }} | |
- name: Install packages | |
run: npm ci | |
- name: Run all tests | |
run: npm run test:coverage | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v3 |