git actions #2
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: Build, Test, and Deploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Use Node.js 18.x version (or specify your Node version) | |
cache: 'pnpm' | |
# Install pnpm globally | |
- name: Install pnpm | |
run: npm install -g pnpm | |
# Install project dependencies using pnpm | |
- name: Install dependencies | |
run: pnpm install | |
# Run tests | |
- name: Run tests | |
run: pnpm test | |
# Optionally, add a build or deployment step here if required |