forked from saleor/storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.75 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: QA
on: [pull_request]
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.11.0 # version used by Vercel
- uses: actions/setup-node@v3
with:
node-version: "18"
cache: "pnpm"
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v2
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- name: Install dependencies
run: pnpm --version && pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Validate paths
env:
SALEOR_API_URL: https://master.staging.saleor.cloud/graphql/
run: |
pnpm --filter=storefront paths
pnpm prettier --write ./apps/storefront/lib/\$path.ts
git diff --exit-code ./apps/storefront/lib/\$path.ts
- name: Check linters
run: pnpm run lint
- name: Check TypeScript
run: pnpm run check-types
- name: Run tests
env:
TEST_MOLLIE_KEY: ${{ secrets.TEST_MOLLIE_KEY }}
TEST_MOLLIE_PROFILE_ID: ${{ secrets.TEST_MOLLIE_PROFILE_ID }}
TEST_STRIPE_SECRET_KEY: ${{ secrets.TEST_STRIPE_SECRET_KEY }}
TEST_STRIPE_PUBLISHABLE_KEY: ${{ secrets.TEST_STRIPE_PUBLISHABLE_KEY }}
TEST_STRIPE_WEBHOOK_SECRET: ${{ secrets.TEST_STRIPE_WEBHOOK_SECRET }}
SETTINGS_ENCRYPTION_SECRET: "testng"
SALEOR_APP_TOKEN: "test"
run: pnpm run test