From 4f777c0e8707c2f042453892d7ae7d73717d3d0e Mon Sep 17 00:00:00 2001 From: Joery <44531907+Joery-M@users.noreply.github.com> Date: Tue, 26 Mar 2024 20:51:49 +0100 Subject: [PATCH] Create vitest.yml --- .github/workflows/vitest.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/vitest.yml diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml new file mode 100644 index 00000000..97981f2f --- /dev/null +++ b/.github/workflows/vitest.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [20.12.0] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install pnpm + uses: pnpm/action-setup@v3.0.0 + - run: pnpm build --if-present + - run: pnpm test