Skip to content

docs

docs #26

Workflow file for this run

name: Pipeline
on: push
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x']
mongodb-version: ['5', '6', '7']
mongodb-package-version: ['4', '5', '6']
steps:
- uses: actions/checkout@v4
- run: MONGO_VERSION=${{ matrix.mongodb-version }} docker-compose up -d
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run lint
- run: npm run format-check
- run: npm install mongodb@${{ matrix.mongodb-package-version }} -D
- run: npm run build
- run: npm test
env:
CI: true
- run: docker-compose down
if: always()
- run: npx codecov
if: matrix.node-version == '18.x' && matrix.mongodb-version == '5' && matrix.mongodb-package-version == '4'
publish:
if: github.ref == 'refs/heads/main'
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm publish || echo "Already published"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}