-
Notifications
You must be signed in to change notification settings - Fork 339
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
Add CI workflows for test
workspace
#5575
Conversation
dbfe476
to
270ec7e
Compare
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.
Reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @MarkusPettersson98)
.github/workflows/clippy-test.yml
line 7 at r2 (raw file):
pull_request: paths: - 'test/**/*.rs'
This should probably include the workflow itself.
.github/workflows/rustfmt-test.yml
line 7 at r2 (raw file):
pull_request: paths: - 'test/**/*.rs'
Same as above.
.github/workflows/rustfmt-test.yml
line 19 at r2 (raw file):
uses: actions-rs/toolchain@v1.0.6 with: toolchain: stable
I know it's taken from rustfmt.yml
, but surely "Install nightly Rust" isn't correct here? :)
.github/workflows/test-runner.yml
line 1 at r2 (raw file):
# Compile the test runner
Nit: We build test-manager
as well here. Maybe the jobs should also be renamed from build-test-runner...
to build-test-framework`.
.github/workflows/test-runner.yml
line 7 at r2 (raw file):
pull_request: paths: - "test/**"
Same as above about including the workflow itself.
.github/workflows/test-runner.yml
line 8 at r2 (raw file):
paths: - "test/**" # Maybe we should check if changes to the app code (mullvad-management-interface) will break the test runner
That seems sensible! We use far more crates than just mullvad-management-interface
, though. Would it be crazy to run this on the same conditions as daemon.yml
? That does seem like the right thing to do.
.github/workflows/test-runner.yml
line 52 at r2 (raw file):
- name: Build test runner working-directory: test run: cargo build --release -p test-runner --target ${{ matrix.target }}
Maybe we could squeeze in the test-manager
build here by adding a condition:
if: matrix.target != 'x86_64-pc-windows-gnu'
And building the test-runner
in a step afterwards, unconditionally.
dfd1359
to
bcb042c
Compare
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.
Reviewable status: 1 of 10 files reviewed, 7 unresolved discussions (waiting on @dlon)
.github/workflows/clippy-test.yml
line 7 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
This should probably include the workflow itself.
Good point 😊
.github/workflows/rustfmt-test.yml
line 7 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
Same as above.
Ack
.github/workflows/rustfmt-test.yml
line 19 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
I know it's taken from
rustfmt.yml
, but surely "Install nightly Rust" isn't correct here? :)
He.. :)
.github/workflows/test-runner.yml
line 1 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
Nit: We build
test-manager
as well here. Maybe the jobs should also be renamed frombuild-test-runner...
to build-test-framework`.
Yeah, this should be de-duped
.github/workflows/test-runner.yml
line 7 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
Same as above about including the workflow itself.
Ack
.github/workflows/test-runner.yml
line 8 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
That seems sensible! We use far more crates than just
mullvad-management-interface
, though. Would it be crazy to run this on the same conditions asdaemon.yml
? That does seem like the right thing to do.
Hmm, I guess it is not too costly to do so. Better safe than sorry 😊
.github/workflows/test-runner.yml
line 52 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
Maybe we could squeeze in the
test-manager
build here by adding a condition:if: matrix.target != 'x86_64-pc-windows-gnu'
And building the
test-runner
in a step afterwards, unconditionally.
Makes sense 😊
b5dd597
to
8ffc2a1
Compare
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.
Reviewable status: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @dlon)
.github/workflows/test-runner.yml
line 52 at r2 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Makes sense 😊
I solved this by instead splitting up the build process into three distinct jobs: build-test-framework-linux
, build-test-framework-macos
& build-test-runner-windows
😊
7b1b951
to
4f08d09
Compare
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.
Reviewed 12 of 12 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
.github/workflows/test-framework.yml
line 8 at r3 (raw file):
paths: - "test/**" - .github/workflows/test-framework.yml
These two should already be included by the paths below now.
.github/workflows/android-app.yml
line 16 at r2 (raw file):
- '!gui/**' - '!ios/**' - '!test/**'
This one probably could be kept.
4f08d09
to
c62c3ec
Compare
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.
Reviewable status: 10 of 12 files reviewed, all discussions resolved (waiting on @dlon)
.github/workflows/android-app.yml
line 16 at r2 (raw file):
Previously, dlon (David Lönnhager) wrote…
This one probably could be kept.
Good catch!
.github/workflows/test-framework.yml
line 8 at r3 (raw file):
Previously, dlon (David Lönnhager) wrote…
These two should already be included by the paths below now.
done
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.
Reviewed 1 of 2 files at r4.
Reviewable status: 11 of 12 files reviewed, all discussions resolved (waiting on @dlon)
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.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
a27c4d8
to
1caa0b5
Compare
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.
Reviewed 4 of 4 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
.github/workflows/testframework.yml
line 3 at r5 (raw file):
# Compile the test framework --- name: DES Testframework - Build
Nit: Should probably be two words: test framework. Also, why not "Desktop"?
2a5018e
to
4d2fb8e
Compare
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.
Reviewable status: 9 of 12 files reviewed, all discussions resolved (waiting on @dlon)
.github/workflows/testframework.yml
line 3 at r5 (raw file):
Previously, dlon (David Lönnhager) wrote…
Nit: Should probably be two words: test framework. Also, why not "Desktop"?
Makes sense. I used the Linear convention (DES), but "Desktop" is aligned better with the current naming convention of other workflows.
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.
Reviewed 1 of 3 files at r6, 3 of 3 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Check formatting of rust source code in the `test` workspace.
Check for code quality improvements on all rust source code with `clippy` in the `test` workspace.
Build the `test-manager` for the host platforms (Linux & macOS) as well as the `test-runner` for all supported platforms (Linux, Windows & macOS).
Add some missing system libraries for compiling the test framework. These are dependencies which the base `mullvad/mullvadvpn-app-build` container does not include.
4d2fb8e
to
e14ccfe
Compare
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.
Reviewed 3 of 3 files at r8, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
The testing framework living in
test/
historically had no CI checks. It didn't use to have it while it was developed in a separate repository, nor did it get any during its adoption into the app repository.This PR introduces some basic CI checks when application logic is touched in the
test
workspace:rustfmt --check
is run on all Rust source filesclippy
is run with the same configuration as the main apptest-runner
is compiled for all supported platforms (Linux, Windows & macOS)test-manager
is compiled for all supported host platforms (Linux & macOS)This should hopefully stabilize the development done to the testing framework. There is still more to be done on the CI front in the testing framework, but this is a good start.
Fixes DES-502
This change is