From ab23fe55973b713d6ebb023e08113a6a1e09fb92 Mon Sep 17 00:00:00 2001 From: zurmokeeper <3382272560@qq.com> Date: Sun, 28 May 2023 13:36:44 +0800 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tests.yml 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