Skip to content

Commit 79f7a1c

Browse files
Merge pull request #400 from Workiva/add_cdn_publish_back_temporarily
Add CDN publish back temporarily
2 parents 0370d08 + 92c3097 commit 79f7a1c

File tree

4 files changed

+56
-13
lines changed

4 files changed

+56
-13
lines changed

.github/workflows/dart_ci.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
# Can't run on `stable` (Dart 3) until we're fully null-safe.
19-
sdk: [2.18.7, 2.19.6]
19+
sdk: [2.19.6]
2020
steps:
2121
- uses: actions/checkout@v2
2222
- uses: dart-lang/setup-dart@v1
@@ -36,29 +36,21 @@ jobs:
3636

3737
- name: Verify formatting
3838
run: dart run dart_dev format --check
39-
if: ${{ matrix.sdk == '2.18.7' }}
39+
if: ${{ matrix.sdk == '2.19.6' }}
4040

4141
- name: Analyze project source
4242
run: dart analyze
4343
if: always() && steps.install.outcome == 'success'
4444

4545
- name: Run tests (DDC)
4646
run: |
47-
if [ ${{ matrix.sdk }} = '2.13.4' ]; then
48-
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc-legacy
49-
else
50-
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc
51-
fi
47+
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc
5248
if: always() && steps.install.outcome == 'success'
5349
timeout-minutes: 5
5450

5551
- name: Run tests (dart2js)
5652
run: |
57-
if [ ${{ matrix.sdk }} = '2.13.4' ]; then
58-
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js-legacy
59-
else
60-
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js
61-
fi
53+
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js
6254
if: always() && steps.install.outcome == 'success'
6355
timeout-minutes: 5
6456
- uses: anchore/sbom-action@v0

Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM drydock-prod.workiva.net/workiva/dart2_base_image:2 as dart2
2+
3+
RUN dart --version
4+
5+
WORKDIR /build
6+
COPY pubspec.yaml .
7+
8+
RUN dart pub get
9+
10+
COPY /lib ./lib/
11+
RUN cd lib && tar -czvf ../cdn_assets.tar.gz *.js *.map
12+
ARG BUILD_ARTIFACTS_CDN=/build/cdn_assets.tar.gz
13+
14+
FROM scratch

example/test/react_test_components.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ class _ClockComponent extends react.Component {
129129

130130
@override
131131
render() {
132-
return react.span({'onClick': (event) => print('Hello World!')},
132+
return react.span(
133+
{'onClick': (event) => print('Hello World!')},
133134
// { 'onClick': (event, [domid = null]) => print("Hello World!") },
134135
['Seconds elapsed: ', "${state['secondsElapsed']}"]);
135136
}

skynet.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: validate_cdn_artifact
2+
description: Verifies the cdn artifact generated in the build contains the JS bundle files
3+
image: drydock.workiva.net/workiva/skynet-images:node-test-image-latest
4+
size: large
5+
timeout: 900
6+
7+
requires:
8+
Workiva/react-dart:
9+
- cdn
10+
11+
scripts:
12+
- mkdir build
13+
- cp $SKYNET_APPLICATION_REACT_DART_CDN ./build
14+
- cd build
15+
- tar -xf cdn_assets.tar.gz
16+
- test -e ./react.js && { echo 'Verified dev bundle exists in CDN artifact.'; } || { echo 'Dev bundle /lib/react.js should exist in CDN artifact.'; exit 1; }
17+
- test -e ./react_dom.js && { echo 'Verified dev DOM bundle exists in CDN artifact.'; } || { echo 'Dev DOM bundle /lib/react_dom.js should exist in CDN artifact.'; exit 1; }
18+
- test -e ./react_with_react_dom_prod.js && { echo 'Verified prod bundle exists in CDN artifact.'; } || { echo 'Prod bundle /lib/react_with_react_dom_prod.js should exist in CDN artifact.'; exit 1; }
19+
- test -e ./react_prod.js && { echo 'Verified prod bundle exists in CDN artifact.'; } || { echo 'Prod bundle /lib/react_prod.js should exist in CDN artifact.'; exit 1; }
20+
- test -e ./react_dom_prod.js && { echo 'Verified prod DOM bundle exists in CDN artifact.'; } || { echo 'Prod DOM bundle /lib/react_dom_prod.js should exist in CDN artifact.'; exit 1; }
21+
22+
---
23+
24+
name: verify-github-actions
25+
description: Verify that the github actions run passed, this is needed to make pipelines pass without manual intervention
26+
contact: 'Frontend Frameworks Architecture / #support-frontend-architecture'
27+
image: drydock.workiva.net/workiva/skynet-images:3728345 # Uses the image from this branch: https://github.com/Workiva/skynet-images/pull/127
28+
size: small
29+
timeout: 600
30+
31+
env:
32+
# encrypted github token used for requests to api.github.com
33+
- secure: wqV2dUVmOMNZgll+/Sr4fra76p+gTvqRS3QvNQASg3hzoysFz7enBaKsXKXoPFj+jexOvFVN/m4rko272z/xZ6lBMRI=
34+
35+
scripts:
36+
- python3 /actions/verify_github_actions.py

0 commit comments

Comments
 (0)