auto build before publish #2
This file contains hidden or 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: Test | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/test.yml' | |
| - '.oxlintrc.json' | |
| - 'package.json' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'tsconfig*.json' | |
| push: | |
| paths: | |
| - '.github/workflows/test.yml' | |
| - '.oxlintrc.json' | |
| - 'package.json' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'tsconfig*.json' | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 22 | |
| - run: npm install | |
| - name: Lint | |
| run: npm run lint | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Node 22 MongoDB Memory Server | |
| env: | |
| FORCE_COLOR: true | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 22 | |
| - run: npm install | |
| - name: Run tests | |
| run: npm test | |
| - name: Test TypeScript types | |
| run: npm run test:types |