chore: Upgraded vite => 4.4.9 & vitest => 0.34.4 for workspace. #41
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: nitro-cors/vitest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
unit: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18, 19] | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
# Setup .npmrc file to publish to GitHub Packages | |
- name: Setup node env π and .npmrc file to publish to GitHub Packages | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: 'https://npm.pkg.github.com' | |
# Defaults to the user or organization that owns the workflow file: | |
scope: '@observerly' | |
- name: Cache node_modules π¦ | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install pnpm globally | |
run: npm install -g [email protected] | |
- name: Install project dependencies π¨π»βπ» | |
run: pnpm install | |
- name: Build the package ready for publishing | |
run: pnpm run build | |
- name: Run vitest tests π§ͺ | |
run: pnpm run test |