Skip to content

Adjust package scope #12

Adjust package scope

Adjust package scope #12

Workflow file for this run

name: Test
on: [push]
env:
DEFAULT_NODE_VERSION: '20'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
- name: Lint
run: yarn lint
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version: [18, 20, 22]
mongodb_driver_version: ['4.17.2', '5.5.0', '5.9.2', '6.7.0']
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: 'yarn'
- name: Install dependencies
run: yarn
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
- name: Install MongoDB driver
run: yarn add -DE mongodb@${{ matrix.mongodb_driver_version }}; yarn
- name: Compile app
run: yarn build
- uses: supercharge/mongodb-github-action@1.11.0
- uses: supercharge/redis-github-action@1.8.0
- name: Run tests
run: yarn test
env:
MONGODB_URI: mongodb://localhost:27017/east_mongo_test
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}