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