2.1.0 #132
Workflow file for this run
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 | |
- pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# When updating, also update README.md Compatibility | |
pkg: [{ keyv: '3.x', suite: '=1.6.11' }, { keyv: '4.x', suite: '1.x' }] | |
node: ['14.x', '16.x', '18.x', '20.x', '22.x'] | |
include: | |
- pkg: { keyv: '5.x', suite: '2.x' } | |
node: '20.x' | |
deps: 'vitest@2.x' | |
- pkg: { keyv: '5.x', suite: '2.x' } | |
node: '22.x' | |
deps: 'vitest@2.x' | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install Node.js ${{matrix.node}} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{matrix.node}} | |
- name: Configure Firestore credentials | |
run: | | |
echo "$S" > .google-credentials.json | |
env: | |
S: ${{secrets.FIRESTORE_CREDS}} | |
- name: Install dependencies | |
run: npm install | |
- name: Install Keyv ${{matrix.pkg.keyv}} | |
run: npm install keyv@${{matrix.pkg.keyv}} @keyv/test-suite@${{matrix.pkg.suite}} ${{matrix.deps}} | |
- name: Run tests (Ava) | |
run: npm run test:ava | |
if: ${{!startsWith(matrix.pkg.suite, '2.')}} | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS: .google-credentials.json | |
- name: Run tests (Vitest) | |
run: npm run test:vitest | |
if: ${{startsWith(matrix.pkg.suite, '2.')}} | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS: .google-credentials.json | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm install | |
- name: Install Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Run standard | |
run: npm run test:lint |