Merge pull request #67 from naftali100/dependabot/npm_and_yarn/vite-5… #21
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: Node.js CI | |
on: | |
push: | |
branches: | |
- main # You can specify the branch you want to trigger the workflow on | |
- ci-test | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18, 20] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Test | |
run: pnpm test | |
- name: Build | |
run: pnpm build | |
# - name: Get npm cache directory | |
# id: npm-cache-dir | |
# shell: bash | |
# run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
# - uses: actions/[email protected] | |
# id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
# with: | |
# path: ${{ steps.npm-cache-dir.outputs.dir }} | |
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-node- | |
# - name: Install dependencies | |
# run: npm ci | |
# - name: Test | |
# run: npm run test | |
# - name: Build | |
# run: npm run build |