-
Notifications
You must be signed in to change notification settings - Fork 16
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
FEA-318: Use github actions instead of travis for CI #189
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
FEA-318
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.
just a couple of small things
- pub run dart_dev format --check | ||
- pub run dart_dev analyze | ||
- pub run dart_dev test | ||
- pub run dart_dev test --release |
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 this workflow used dart_dev
, we'll probably want to do that in the github workflow as well.
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.
I'm confused on why no other workflow does 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.
Likely because most of them don't actually depend on dart_dev. Looks like at least w_transport uses 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.
But in general, running dart run dart_dev test
is just any other CLI command. There's no reason it can't or shouldn't be used in a github workflow.
@@ -632,17 +632,15 @@ void runTests(bool runSpanTests) { | |||
expect( | |||
Logger.root.onRecord, | |||
emits( | |||
logRecord(level: Level.WARNING, message: contains('loading')))); | |||
logRecord(level: Level.CONFIG, message: contains('loading')))); |
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.
What caused this change?
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.
Ah, looks like we had a PR go through which updated a log level: https://github.com/Workiva/w_module/pull/181/files
That was able to sneak through because tests weren't actually being ran.
skynet.yaml
Outdated
name: w_module-unit-tests | ||
description: Unit tests | ||
contact: 'Frontend Frameworks Architecture / #support-frontend-architecture' | ||
image: drydock.workiva.net/workiva/dart_unit_test_image:1 | ||
size: large | ||
timeout: 600 | ||
|
||
artifacts: /testing/w_module/test-reports | ||
test-reports: /testing/w_module/test-reports | ||
|
||
scripts: | ||
- cd /testing/w_module/ | ||
- ./run_tests.sh |
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 we already run tests in github workflows, perhaps just no-op here.
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.
What's the benefit of having them run via workflows rather than skynet?
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.
I believe it's so that open source contributors can see the results of a CI run (skynet requires privileged access).
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.
Ahhhh
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.
Was there a reason to move the tests from test/
to test/unit/
? In many of our smaller packages, we only have unit tests, so putting them directly in test/
is sufficient/simpler.
FEA-318
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.
I think we should avoid moving things under test/
to test/unit
.
skynet.yaml
Outdated
on-pull-request: true | ||
|
||
scripts: | ||
- echo "No tests currently set" |
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.
- echo "No tests currently set" | |
- echo "Tests run in a Github Workflow" |
@@ -632,17 +632,15 @@ void runTests(bool runSpanTests) { | |||
expect( | |||
Logger.root.onRecord, | |||
emits( | |||
logRecord(level: Level.WARNING, message: contains('loading')))); | |||
logRecord(level: Level.CONFIG, message: contains('loading')))); |
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.
Ah, looks like we had a PR go through which updated a log level: https://github.com/Workiva/w_module/pull/181/files
That was able to sneak through because tests weren't actually being ran.
.github/workflows/dart_ci.yml
Outdated
run: dart pub run dart_dev analyze | ||
if: always() && steps.install.outcome == 'success' | ||
|
||
- name: Run tests with ddc | ||
run: dart pub run dart_dev test | ||
if: always() && steps.install.outcome == 'success' | ||
|
||
- name: Run tests with dart2js | ||
run: dart pub run dart_dev test --release | ||
if: always() && steps.install.outcome == 'success' | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dart-lang/[email protected] | ||
with: | ||
sdk: 2.13.4 | ||
|
||
- id: install | ||
name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Verify formatting | ||
run: dart pub run dart_dev format --check | ||
if: always() && steps.install.outcome == 'success' |
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.
#nit the dart
cli supports run
directly, so I believe we can omit the pub
in these commands
run: dart pub run dart_dev analyze | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests with ddc | |
run: dart pub run dart_dev test | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests with dart2js | |
run: dart pub run dart_dev test --release | |
if: always() && steps.install.outcome == 'success' | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/[email protected] | |
with: | |
sdk: 2.13.4 | |
- id: install | |
name: Install dependencies | |
run: dart pub get | |
- name: Verify formatting | |
run: dart pub run dart_dev format --check | |
if: always() && steps.install.outcome == 'success' | |
run: dart run dart_dev analyze | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests with ddc | |
run: dart run dart_dev test | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests with dart2js | |
run: dart run dart_dev test --release | |
if: always() && steps.install.outcome == 'success' | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/[email protected] | |
with: | |
sdk: 2.13.4 | |
- id: install | |
name: Install dependencies | |
run: dart pub get | |
- name: Verify formatting | |
run: dart run dart_dev format --check | |
if: always() && steps.install.outcome == 'success' |
ac928f4
to
ec4d09f
Compare
FEA-318
195bfc7
to
980595b
Compare
FEA-318
FEA-318
FEA-318
FEA-318
QA +1
|
@Workiva/release-management-p |
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.
+1 from RM
FEA-318
Motivation
The w_module repo is currently using travis for CI. We don't use that anymore.
Changes
Used github actions instead of travis. Added a skynet.yaml.
Release Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: