-
Notifications
You must be signed in to change notification settings - Fork 634
35 lines (27 loc) · 943 Bytes
/
main.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
name: Build, TypeScripts, tests
on: [pull_request]
concurrency:
group: tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_SALEOR_API_URL: ${{ vars.NEXT_PUBLIC_SALEOR_API_URL }}
steps:
- uses: actions/checkout@v3
- name: Get PNPM version from package.json
id: pnpm-version
run: echo "pnpm_version=$(cat package.json | jq '.engines.pnpm' | sed -E 's/[^0-9.]//g')" >> $GITHUB_OUTPUT
- name: Install PNPM
uses: pnpm/[email protected]
with:
version: ${{ steps.pnpm-version.outputs.pnpm_version }}
- uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: "pnpm"
- name: Install dependencies
run: pnpm --version && pnpm install --frozen-lockfile
- name: Build
run: pnpm run build