-
Notifications
You must be signed in to change notification settings - Fork 0
186 lines (180 loc) · 5.91 KB
/
Copy pathpreview.yml
File metadata and controls
186 lines (180 loc) · 5.91 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: Preview
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
unit:
name: Unit
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup dotnet
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Install Tools
run: dotnet tool restore
working-directory: ./sln
- name: Install Packages
run: |
dotnet paket install
dotnet restore FSharp.ViewEngine.slnx
working-directory: ./sln
- name: Build solution
run: dotnet build FSharp.ViewEngine.slnx --configuration Release --no-restore
working-directory: ./sln
- name: Test
run: ./fake.sh Test
working-directory: ./sln
- name: Pack Core
env:
PACKAGE_ID: FSharp.ViewEngine
PACKAGE_VERSION: 0.0.0-preview
run: ./fake.sh Pack --single-target
working-directory: ./sln
- name: Verify Core package compatibility
env:
PACKAGE_ID: FSharp.ViewEngine
run: ./fake.sh VerifyPackage --single-target
working-directory: ./sln
- name: Pack Docs with an independent version and Core dependency
env:
PACKAGE_ID: FSharp.ViewEngine.Docs
PACKAGE_VERSION: 0.0.1-preview
DOCS_MINIMUM_CORE_VERSION: 0.0.0-preview
run: ./fake.sh Pack --single-target
working-directory: ./sln
- name: Verify Docs package compatibility
env:
PACKAGE_ID: FSharp.ViewEngine.Docs
DOCS_MINIMUM_CORE_VERSION: 0.0.0-preview
run: ./fake.sh VerifyPackage --single-target
working-directory: ./sln
e2e:
name: E2E
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: e2e/package-lock.json
- name: Install E2E packages
run: npm ci
working-directory: ./e2e
- name: Test production Docs image
run: bash scripts/test-ci.sh
working-directory: ./e2e
- name: Upload E2E diagnostics
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: fsharp-viewengine-preview-e2e
path: |
e2e/playwright-report
e2e/test-results
/tmp/fsharp-viewengine-e2e
if-no-files-found: ignore
pulumi:
name: Pulumi validation
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: pulumi/package-lock.json
- name: Install Packages
run: npm ci
working-directory: ./pulumi
- name: Typecheck
run: npx tsc --noEmit
working-directory: ./pulumi
preview:
name: Pulumi preview
needs:
- unit
- e2e
- pulumi
if: >-
needs.unit.result == 'success' &&
needs.e2e.result == 'success' &&
needs.pulumi.result == 'success' &&
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: pulumi/package-lock.json
# Pulumi ESC supplies CLOUDSDK_AUTH_ACCESS_TOKEN to the Pulumi process.
# setup-gcloud cannot detect token overrides: https://github.com/google-github-actions/setup-gcloud/issues/731
- name: Install GKE auth plugin
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
with:
install_components: gke-gcloud-auth-plugin
- name: Install Packages
run: npm ci
working-directory: ./pulumi
- name: Authenticate Pulumi
uses: pulumi/auth-actions@141415910c3beb54e03b48e9057c204c97b956f2 # v2.1.0
with:
organization: meiermade
requested-token-type: urn:pulumi:token-type:access_token:personal
scope: user:meiermade
- name: Preview
uses: pulumi/actions@8e5e406f4007fca908480587cb9893c07090f58d # v7.0.0
env:
RELEASE_COMMIT: ${{ github.event.pull_request.head.sha }}
with:
work-dir: ./pulumi
command: preview
stack-name: meiermade/fsharp-view-engine/prod
diff: true
comment-on-pr: true
test:
# Keep this terminal job named Test because it is the protected branch check.
name: Test
needs:
- unit
- e2e
- pulumi
- preview
if: always()
runs-on: ubuntu-latest
timeout-minutes: 2
permissions:
contents: read
steps:
- name: Verify required checks
env:
UNIT_RESULT: ${{ needs.unit.result }}
E2E_RESULT: ${{ needs.e2e.result }}
PULUMI_RESULT: ${{ needs.pulumi.result }}
PREVIEW_ACCEPTED: ${{ needs.preview.result == 'success' || needs.preview.result == 'skipped' }}
run: |
test "$UNIT_RESULT" = success
test "$E2E_RESULT" = success
test "$PULUMI_RESULT" = success
test "$PREVIEW_ACCEPTED" = true