Skip to content

Commit

Permalink
Run GUI tests as a separate testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 18, 2024
1 parent 2a13ca2 commit cc8ce35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust
run: bash ci/install-rust.sh ${{ matrix.rust }} ${{ matrix.target }}
- name: Install npm
if: matrix.os != 'windows-latest'
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install browser-ui-test
if: matrix.os != 'windows-latest'
run: npm install browser-ui-test@"${BROWSER_UI_TEST_VERSION}"
- name: Build and run tests (+ GUI)
if: matrix.os != 'windows-latest'
run: cargo test --locked --target ${{ matrix.target }} --test gui
- name: Build and run tests
run: cargo test --locked --target ${{ matrix.target }}
- name: Test no default
Expand All @@ -84,6 +73,22 @@ jobs:
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt --check

gui:
name: GUI tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
- name: Install npm
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install browser-ui-test
run: npm install browser-ui-test@"${BROWSER_UI_TEST_VERSION}"
- name: Build and run tests (+ GUI)
run: cargo test --locked --target x86_64-unknown-linux-gnu --test gui

# The success job is here to consolidate the total success/failure state of
# all other jobs. This job is then included in the GitHub branch protection
# rule which prevents merges unless all other jobs are passing. This makes
Expand Down
2 changes: 1 addition & 1 deletion tests/gui/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ fn main() {

// Then we run the GUI tests on it.
let status = command.status().expect("failed to get command output");
assert!(status.success());
assert!(status.success(), "{status:?}");
}

0 comments on commit cc8ce35

Please sign in to comment.