Add screenshot check on UI (#16486)
# Objective - Progress towards #15918 - Add test on UI ## Solution - Get a single screenshot from the UI testbed example - Remove older examples from runs in CI as they're covered by the testbed to reduce CI duration
This commit is contained in:
parent
a9a4b069b6
commit
689c21d315
5
.github/example-run/alien_cake_addict.ron
vendored
5
.github/example-run/alien_cake_addict.ron
vendored
@ -1,5 +0,0 @@
|
||||
(
|
||||
events: [
|
||||
(300, AppExit),
|
||||
]
|
||||
)
|
8
.github/example-run/breakout.ron
vendored
8
.github/example-run/breakout.ron
vendored
@ -1,8 +0,0 @@
|
||||
(
|
||||
setup: (
|
||||
fixed_frame_time: Some(0.03),
|
||||
),
|
||||
events: [
|
||||
(900, AppExit),
|
||||
]
|
||||
)
|
6
.github/example-run/testbed_ui.ron
vendored
Normal file
6
.github/example-run/testbed_ui.ron
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
(
|
||||
events: [
|
||||
(100, Screenshot),
|
||||
(200, AppExit),
|
||||
]
|
||||
)
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -261,10 +261,6 @@ jobs:
|
||||
- name: Disable audio
|
||||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes
|
||||
run: git apply --ignore-whitespace tools/example-showcase/disable-audio.patch
|
||||
- name: Build bevy
|
||||
# this uses the same command as when running the example to ensure build is reused
|
||||
run: |
|
||||
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
|
||||
- name: Run examples
|
||||
run: |
|
||||
for example in .github/example-run/*.ron; do
|
||||
|
9
.github/workflows/validation-jobs.yml
vendored
9
.github/workflows/validation-jobs.yml
vendored
@ -101,10 +101,6 @@ jobs:
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build bevy
|
||||
# this uses the same command as when running the example to ensure build is reused
|
||||
run: |
|
||||
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
|
||||
- name: Run examples
|
||||
run: |
|
||||
for example in .github/example-run/*.ron; do
|
||||
@ -155,11 +151,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build bevy
|
||||
shell: bash
|
||||
# this uses the same command as when running the example to ensure build is reused
|
||||
run: |
|
||||
WGPU_BACKEND=dx12 TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
|
||||
- name: Run examples
|
||||
shell: bash
|
||||
run: |
|
||||
|
@ -10,14 +10,11 @@ use bevy::{
|
||||
picking::focus::HoverMap,
|
||||
prelude::*,
|
||||
ui::widget::NodeImageMode,
|
||||
winit::WinitSettings,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let mut app = App::new();
|
||||
app.add_plugins(DefaultPlugins)
|
||||
// Only run the app when there is user input. This will significantly reduce CPU/GPU use.
|
||||
.insert_resource(WinitSettings::desktop_app())
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, update_scroll_position);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user