-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up Workiva Build, move build steps since Travis which no longer runs #296
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
FROM drydock-prod.workiva.net/workiva/dart_build_image:1 | ||
|
||
# Chrome install taken from https://github.com/Workiva/dart_unit_test_image/blob/master@%7B13-01-2021%7D/Dockerfile | ||
|
||
# Set the expected Chrome major version. This allows us to update the expected version when | ||
# we need to roll out a new version of this base image with a new chrome version as the only change | ||
ENV EXPECTED_CHROME_VERSION=87 | ||
|
||
# Install Chrome | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | ||
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \ | ||
apt-get -qq update && apt-get install -y google-chrome-stable && \ | ||
mv /usr/bin/google-chrome-stable /usr/bin/google-chrome && \ | ||
sed -i --follow-symlinks -e 's/\"\$HERE\/chrome\"/\"\$HERE\/chrome\" --no-sandbox/g' /usr/bin/google-chrome | ||
|
||
# Fail the build if the version doesn't match what we expected | ||
RUN google-chrome --version | grep " $EXPECTED_CHROME_VERSION\." | ||
|
||
# Need to analyze and format since dart_build_image only does it automatically for | ||
# packages that depend on dart_dev | ||
RUN dartanalyzer . | ||
RUN dartfmt --line-length=120 --dry-run --set-exit-if-changed . | ||
|
||
RUN pub run dependency_validator -i build_runner,build_test,build_web_compilers | ||
|
||
# TODO run tests using dart_unit_test_image in skynet, remove Chrome install | ||
RUN pub run build_runner test --release -- --preset dart2js --exclude-tags=dart-2-7-dart2js-variadic-issues | ||
RUN pub run build_runner test -- --preset dartdevc | ||
|
||
RUN dart ./tool/run_consumer_tests.dart --orgName Workiva --repoName over_react --testCmd "pub run dart_dev test -P dartdevc" | ||
|
||
|
||
# We need 2.9.2 to verify the Chrome MemoryInfo workaround: https://github.com/cleandart/react-dart/pull/280, | ||
# and to run the tests that fail in 2.7 | ||
# TODO remove the workaround as well as this config once SDK lower bound is >=2.9.3 | ||
FROM google/dart:2.9.2 | ||
RUN dart --version | ||
|
||
# Don't allow the dart package to be updated via apt | ||
RUN apt-mark hold dart | ||
|
||
# Update image - required by aviary | ||
RUN apt-get update -qq && \ | ||
apt-get dist-upgrade -y && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean all | ||
# Install deps for Chrome install | ||
RUN apt-get install -y \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
make \ | ||
parallel \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Chrome install taken from https://github.com/Workiva/dart_unit_test_image/blob/master@%7B13-01-2021%7D/Dockerfile | ||
|
||
# Set the expected Chrome major version. This allows us to update the expected version when | ||
# we need to roll out a new version of this base image with a new chrome version as the only change | ||
ENV EXPECTED_CHROME_VERSION=87 | ||
|
||
# Install Chrome | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | ||
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \ | ||
apt-get -qq update && apt-get install -y google-chrome-stable && \ | ||
mv /usr/bin/google-chrome-stable /usr/bin/google-chrome && \ | ||
sed -i --follow-symlinks -e 's/\"\$HERE\/chrome\"/\"\$HERE\/chrome\" --no-sandbox/g' /usr/bin/google-chrome | ||
|
||
# Fail the build if the version doesn't match what we expected | ||
RUN google-chrome --version | grep " $EXPECTED_CHROME_VERSION\." | ||
|
||
WORKDIR /build/ | ||
ADD . /build/ | ||
|
||
RUN pub get | ||
# Run dart2js tests that fail in 2.7 | ||
RUN pub run build_runner test --release -- --preset dart2js --tags=dart-2-7-dart2js-variadic-issues | ||
# Run DDC tests to verify Chrome workaround | ||
RUN pub run build_runner test -- --preset dartdevc | ||
|
||
|
||
FROM scratch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,11 +40,7 @@ mixin LifecycleTestHelper on Component { | |
'context': context, | ||
}); | ||
|
||
var lifecycleCallback = props == null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change was just due to dartfmt |
||
? staticProps == null | ||
? null | ||
: staticProps[memberName] | ||
: props[memberName]; | ||
var lifecycleCallback = props == null ? staticProps == null ? null : staticProps[memberName] : props[memberName]; | ||
if (lifecycleCallback != null) { | ||
return Function.apply( | ||
lifecycleCallback, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Rosie supports this and the repo is now part of the Workiva ecosystem, should we nix this and set up consumer testing using Rosie? If not now, we could cut a ticket for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, totally! I just included it since we had it in the old CI, and would have something in place until we set it up