feat: add support for typescript compiler #4
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: '*' | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: [22, 20, 18, 16, 14, 12, 10, 8, 6] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
if: ${{ matrix.node-version >= 8 }} | |
run: npm ci | |
- name: Install dependencies (node < 8) | |
if: ${{ matrix.node-version < 8 }} | |
run: npm install --only=prod | |
- name: Run unit tests | |
if: ${{ matrix.node-version >= 16 }} | |
run: npm test | |
- name: Run unit tests (node < 16) | |
if: ${{ matrix.node-version < 16 }} | |
run: node scripts/legacy-test-runner.js | |
- name: Run unit tests (compilers) | |
if: ${{ matrix.node-version >= 16 }} | |
run: npm install typescript coffee-script --no-save && npm run test:compilers | |