Skip to content

chore: Improve test coverage #208

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

Merged
merged 34 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5bb437a
feat: tighten testing, and frame hygiene
makspll Jan 14, 2025
0005919
remove unnecessary imports in bindings
makspll Jan 15, 2025
9702459
update release-plz config
makspll Jan 15, 2025
fd2c9c2
update pr-title filter
makspll Jan 15, 2025
5050273
trigger bindings ci
makspll Jan 15, 2025
05ffc7e
chore(codegen): update bevy bindings (#209)
github-actions[bot] Jan 15, 2025
d108cbd
Improve UI for adding intiializers and add docs, correct initializati…
makspll Jan 15, 2025
a54e139
remove some unnecessary optionals
makspll Jan 15, 2025
86915f5
report coverage
makspll Jan 15, 2025
7b4746b
remove failing todo
makspll Jan 15, 2025
f4596ba
set error settings
makspll Jan 15, 2025
7c908eb
fix workflow syntax
makspll Jan 15, 2025
1e982a8
run after check and bump versions
makspll Jan 15, 2025
f37f71b
actually include coverage in the run
makspll Jan 15, 2025
782d3b9
install genhtml
makspll Jan 15, 2025
da86e0c
actually use the right path and only upload coverage from ubuntu
makspll Jan 15, 2025
b8ead87
change profile for coverage runs
makspll Jan 15, 2025
2809440
move coverage gen into the matrix
makspll Jan 15, 2025
4d3b82f
output coverage in the matrix
makspll Jan 15, 2025
bd77029
improve comments slightly, and make global contexts work
makspll Jan 15, 2025
5615837
refactor asset systems, make use of internal script asset events
makspll Jan 16, 2025
c050ba4
add simple error test
makspll Jan 16, 2025
f065a90
remove inactive docs code
makspll Jan 16, 2025
9a71df2
improve docs
makspll Jan 16, 2025
71720fd
add reflect reference tests
makspll Jan 17, 2025
02d921a
update report command
makspll Jan 17, 2025
8b45bec
include coverage badge as test
makspll Jan 17, 2025
84b5553
increase badge width and update badge on commit
makspll Jan 17, 2025
0109654
force badge re-creation
makspll Jan 17, 2025
ff90a0b
add more tests to printing and conversions
makspll Jan 17, 2025
f11d09d
update workflow permissions
makspll Jan 17, 2025
c4e6348
update coverage badge on main only
makspll Jan 17, 2025
0f49dcd
fix test and stop ignoring things
makspll Jan 17, 2025
db67aff
ignore bevy bindings from coverage
makspll Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
check:
permissions:
pull-requests: write
contents: write
name: Check - ${{ matrix.run_args.name }}
runs-on: ${{ matrix.run_args.os }}
# container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
Expand All @@ -57,6 +58,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install alsa and udev
if: runner.os == 'linux'
run: |
Expand All @@ -66,11 +68,35 @@ jobs:
with:
toolchain: stable
override: true

- name: Rust Cache
uses: Swatinem/[email protected]

- name: Setup
run: |
cargo xtask init

- name: Check
run: |
${{ matrix.run_args.command }}
${{ matrix.run_args.command }}

- name: Upload coverage artifact
if: ${{ matrix.run_args.generates_coverage }}
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: target/coverage/html/

- name: Update coverage badge
if: ${{ matrix.run_args.generates_coverage && github.ref == 'refs/heads/main' }}
run: |
cp target/coverage/html/badges/for_the_badge.svg badges/coverage.svg

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add badges/coverage.svg

if [[ -n $(git status -s) ]]; then
git commit -m "chore(badge): Update coverage badge" -m "[skip ci]"
git push
fi
1 change: 1 addition & 0 deletions .github/workflows/generate_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
BRANCH_NAME: __update-bevy-bindings-${{ github.head_ref || github.ref_name }}
GH_TOKEN: ${{ github.token }}


jobs:
generate_bindings:
permissions:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-titles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ jobs:
types: |
fix
feat
chore
chore
test
docs
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ codegen-units = 8
incremental = false
debug = false

[profile.ephemeral-coverage]
inherits = "ephemeral-build"
debug = true

[profile.release-with-debug]
inherits = "release"
debug = true
Expand Down
13 changes: 13 additions & 0 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions crates/bevy_api_gen/templates/header.tera
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use super::{{crate}}::*;


use bevy_mod_scripting_core::{
AddContextInitializer,
StoreDocumentation,
bindings::{
ReflectReference,
function::{from::{Ref, Mut, Val}, namespace::{NamespaceBuilder}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello world
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test script
Loading
Loading