Skip to content

Commit

Permalink
Update unittests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GsLogiMaker committed May 16, 2024
1 parent 2f0c55e commit 500fb1d
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,17 @@ jobs:
- name: 🦀 Build Rust code
run: |
cargo build \
--release
--manifest-path ./addons/glecs/rust/glecs/Cargo.toml \
--features compile_bindings \
--target-dir ./addons/glecs/bin \
--target ${{ matrix.target }}
# Copy library for use in test suite
cp -r ./addons/glecs/bin/${{ matrix.target }}/debug ./addons/glecs/bin/debug
# cp -r ./addons/glecs/bin/${TARGET}/release ./addons/glecs/bin/debug
- name: 💾 Cache compiled library
uses: actions/cache/[email protected]
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: ./addons/glecs/bin/${{ matrix.target }}/debug/${{ matrix.glecs_lib }}
path: ./addons/glecs/bin/${{ matrix.target }}/release/${{ matrix.glecs_lib }}
# An explicit key for restoring and saving the cache
key: glecslib.${{ matrix.target }}

Expand Down Expand Up @@ -116,6 +113,24 @@ jobs:
cp ./addons/glecs/bin/${{ matrix.target }}/release/${{ matrix.glecs_lib }} ./addons/glecs/bin/release/${{ matrix.glecs_lib }}
cp ./addons/glecs/bin/${{ matrix.target }}/release/${{ matrix.glecs_lib }} ./addons/glecs/bin/debug/${{ matrix.glecs_lib }}
- name: 🤖 Setup Godot
uses: chickensoft-games/setup-godot@v1
with:
# Version must include major, minor, and patch, and be >= 4.0.0
version: 4.2.1

# This shouldn't be needed because the important files from .godot are
# included, but we run the import process just in case.
- name: 📧 Run Godot import
run: |
godot --headless --editor --quit-after 100
- name: ✏️ Run unittests
run: |
godot -s res://addons/gut/gut_cmdln.gd --headless -gdir="res://unittests" -gexit
- name: 🤖 Run Godot unit tests
id: run-godot-tests
uses: croconut/godot-tester@v5
Expand Down

0 comments on commit 500fb1d

Please sign in to comment.