-
Notifications
You must be signed in to change notification settings - Fork 101
106 lines (91 loc) · 3.3 KB
/
pr.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: pr
on:
pull_request: {}
env:
HIVE_TOKEN: ${{ secrets.HIVE_TOKEN }}
jobs:
# Database Types Diff Check
# We are committing the database types located under the "storage" package, to make it easier to maintain.
# This workflow validates that the types are up to date in the repository, and fails in case of a change that is not committed.
db-types:
uses: ./.github/workflows/db-types-diff.yaml
# GraphQL Breaking Changes Check
# This workflow validates that the GraphQL schema is not breaking, and fails in case of a breaking change.
# To allow a GraphQL breaking change in a PR, you may add the "non-breaking" label to the PR.
graphql-breaking-changes:
uses: ./.github/workflows/graphql-schema-check.yaml
secrets:
hiveToken: ${{ secrets.HIVE_TOKEN }}
# Build all packages and applications, and creates Docker images
build:
name: build
uses: ./.github/workflows/build-and-dockerize.yaml
with:
dockerize: ${{ !github.event.pull_request.head.repo.fork }}
imageTag: ${{ github.event.pull_request.head.sha }}
publishLatest: false
targets: 'build'
uploadJavaScriptArtifacts: true
secrets: inherit
# Run db migrations tests
db-migration-tests:
name: test
uses: ./.github/workflows/tests-db-migrations.yaml
# Unit tests using Vitest
unit-tests:
name: test
uses: ./.github/workflows/tests-unit.yaml
# Integration tests that are based on Docker images created during build step.
integration-tests:
name: test
needs: build
uses: ./.github/workflows/tests-integration.yaml
secrets:
stripeTestPublicKey: ${{ secrets.TEST_STRIPE_PUBLIC_KEY }}
stripeTestSecretKey: ${{ secrets.TEST_STRIPE_SECRET_KEY }}
with:
imageTag: ${{ github.event.pull_request.head.sha }}
# e2e tests using Cypress, runs Hive from pre-built Docker images.
e2e:
name: test
needs: build
uses: ./.github/workflows/tests-e2e.yaml
with:
imageTag: ${{ github.event.pull_request.head.sha }}
# ESLint and Prettier
code-style:
uses: ./.github/workflows/lint.yaml
# CodeQL
static-analysis:
uses: ./.github/workflows/codeql-analysis.yml
# TypeScript Typecheck and compiler checks
typescript:
uses: ./.github/workflows/typescript-typecheck.yaml
# Deploy Website preview to CloudFlare Pages
website-preview:
uses: ./.github/workflows/website.yaml
if: ${{ !github.event.pull_request.head.repo.fork }}
secrets: inherit
# Deploy Storybook preview to CloudFlare Pages
storybook-preview:
uses: ./.github/workflows/storybook.yaml
if: ${{ !github.event.pull_request.head.repo.fork }}
secrets: inherit
# Release alpha version on NPM for Hive libraries
alpha:
uses: ./.github/workflows/release-alpha.yaml
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
secrets: inherit
# Release RC version on NPM for Hive libraries
release-candidate:
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }}
with:
npmTag: rc
restoreDeletedChangesets: true
buildScript: build:libraries
nodeVersion: 22.6
packageManager: pnpm
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}