git actions #3
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: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Specify Node.js version | |
# Set up pnpm using the official pnpm action | |
- name: Set up pnpm | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8.0.0 # Specify the pnpm version you want to use | |
# Install dependencies using pnpm | |
- name: Install dependencies | |
run: pnpm install | |
# Run tests | |
- name: Run tests | |
run: pnpm test |