[OUTDATED] Initial TypeScript setup and conversion (CJS to ESM, ES5 class functions to ES6 classes) #693
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: | |
| push: | |
| branches: | |
| - master | |
| - typescript | |
| pull_request: | |
| branches: | |
| - master | |
| - typescript | |
| jobs: | |
| test: | |
| name: Node ${{ matrix.node }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: | |
| - 20 | |
| - 22 | |
| - 24 | |
| services: | |
| mongodb: | |
| image: mongo:4.4 | |
| ports: | |
| - 27017:27017 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install | |
| run: npm install | |
| - name: Lint | |
| if: github.ref_name != 'typescript' && github.base_ref != 'typescript' # Remove this condition after TS code lints cleanly | |
| run: npm run lint | |
| - name: Test | |
| run: npm run test-cover | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| flag-name: node-${{ matrix.node }} | |
| parallel: true | |
| - name: Test sharedb-mongo | |
| run: scripts/test-sharedb-mongo.sh | |
| finish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Submit coverage | |
| uses: coverallsapp/github-action@master | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true |