-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.19 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "PR Workflow"
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout Code
uses: actions/checkout@v3
# Set up Node.js
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Set up pnpm
- name: Set Up pnpm
uses: pnpm/action-setup@v2
with:
version: 6.0.2
# Install dependencies
- name: Install Dependencies with pnpm
run: pnpm install
# Run tests
- name: Run Tests
run: pnpm test
# Lint the code
- name: Lint Code
run: pnpm run lint
# Build the project
- name: Build Project
run: pnpm run build
# Check for pending changesets before running further tests and version checks
- name: Check for Changesets
id: check_changesets
run: |
if pnpm changeset status | grep -q "No unreleased changesets"; then
echo "No unreleased changesets found. Continuing with standard checks."
else
echo "Changesets found, version bump possible."
continue-on-error: false