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
|
- name: Disable audio
|
||||||
# Disable audio through a patch. on github m1 runners, audio timeouts after 15 minutes
|
# 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
|
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
|
- name: Run examples
|
||||||
run: |
|
run: |
|
||||||
for example in .github/example-run/*.ron; do
|
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/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-run-examples-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- 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
|
- name: Run examples
|
||||||
run: |
|
run: |
|
||||||
for example in .github/example-run/*.ron; do
|
for example in .github/example-run/*.ron; do
|
||||||
@ -155,11 +151,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- 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
|
- name: Run examples
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -10,14 +10,11 @@ use bevy::{
|
|||||||
picking::focus::HoverMap,
|
picking::focus::HoverMap,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
ui::widget::NodeImageMode,
|
ui::widget::NodeImageMode,
|
||||||
winit::WinitSettings,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut app = App::new();
|
let mut app = App::new();
|
||||||
app.add_plugins(DefaultPlugins)
|
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(Startup, setup)
|
||||||
.add_systems(Update, update_scroll_position);
|
.add_systems(Update, update_scroll_position);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user