diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 687675d..66ad3ae 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -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/save@v4.0.2 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 }} @@ -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