diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0c01438 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: Tests +on: + push: + branches: [ main ] + pull_request: + branches: [ '**' ] + +jobs: + test: + runs-on: ${{ matrix.os }} + + name: Node v${{ matrix.node-version }} on ${{ matrix.os }} + strategy: + matrix: + node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install pnpm + run: npm i -g pnpm + + - name: Install Dependencies + run: pnpm install + + - name: Run Tests + run: pnpm run test