Merge pull request #152 from alxndrsn/github-actions #1
This file contains 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: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
timeout-minutes: 2 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: yarn | |
- run: yarn install # --frozen-lockfile TODO get this option working | |
- run: yarn lint | |
test-js: | |
timeout-minutes: 2 | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- '12' | |
- '14' | |
- '16' | |
- '18' | |
- '20' | |
name: test js - node v${{ matrix.node }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- run: yarn install # --frozen-lockfile TODO get this option working | |
- run: yarn test | |
test-ts: | |
timeout-minutes: 2 | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- '12' | |
- '14' | |
- '16' | |
- '18' | |
- '20' | |
name: test ts - node v${{ matrix.node }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- run: yarn install # --frozen-lockfile TODO get this option working | |
- run: yarn test-ts |