-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Update for Godot 4 stable Upgraded to Godot 4. Thanks to: @MikeSchulze for GDUnit his GH Action workflow examples - https://github.com/MikeSchulze/gdUnit4 @bitbrain for his GH Action workflow examples in https://github.com/bitbrain/beehave fix(example): Update Events demo scene for Godot 4 fix(example): crash issue on writing telemetry events ci(pipeline): workflow_dispatch to be in correct indent level ci(pipeline): Update GDUnit4 actions ci(pipeline): Run unit tests on Godot 4.02 & 4.0.3 ci(pipeline): Separate Godot 4 & 3 branches ci(pipeline): Separate Godot 4 workflows ci(pipeline): set new asset ID for new Asset in AssetLib ci(pipeline): Exclude LoginIntegrationTest (broken) ci(pipeline): Removed defunct & unused plugin refresher test(pipeline): Switch test framework to GDUnit4 docs(readme): Added users of godot-playfab to README.md docs(license)Updated licenses
- Loading branch information
Showing
467 changed files
with
26,277 additions
and
12,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: install-godot-binary | ||
description: "Installs the Godot Runtime" | ||
|
||
inputs: | ||
godot-version: | ||
description: "The Godot engine version" | ||
type: string | ||
required: true | ||
godot-status-version: | ||
description: "The Godot engine status version" | ||
type: string | ||
required: true | ||
godot-mono: | ||
required: false | ||
type: boolean | ||
default: false | ||
godot-bin-name: | ||
type: string | ||
required: true | ||
godot-cache-path: | ||
type: string | ||
required: true | ||
|
||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: "Set Cache Name" | ||
shell: bash | ||
run: | | ||
if ${{inputs.godot-mono == 'true'}}; then | ||
echo "CACHE_NAME=${{ runner.OS }}-Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status-version }}_mono" >> "$GITHUB_ENV" | ||
else | ||
echo "CACHE_NAME=${{ runner.OS }}-Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status-version }}" >> "$GITHUB_ENV" | ||
fi | ||
- name: "Build Cache" | ||
uses: actions/cache@v3 | ||
id: godot-cache-binary | ||
with: | ||
path: ${{ inputs.godot-cache-path }} | ||
key: ${{ env.CACHE_NAME }} | ||
restore-keys: ${{ env.CACHE_NAME }} | ||
|
||
- name: "Download and Install Godot ${{ inputs.godot-version }}" | ||
if: steps.godot-cache-binary.outputs.cache-hit != 'true' | ||
continue-on-error: false | ||
shell: bash | ||
run: | | ||
mkdir -p ${{ inputs.godot-cache-path }} | ||
chmod 770 ${{ inputs.godot-cache-path }} | ||
DIR="$HOME/.config/godot" | ||
if [ ! -d "$DIR" ]; then | ||
mkdir -p "$DIR" | ||
chmod 770 "$DIR" | ||
fi | ||
DOWNLOAD_URL=https://downloads.tuxfamily.org/godotengine/${{ inputs.godot-version }} | ||
GODOT_BIN=Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status-version }}_${{ inputs.godot-bin-name }} | ||
if ${{inputs.godot-mono == 'true'}}; then | ||
GODOT_BIN=Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status-version }}_mono_${{ inputs.godot-bin-name }} | ||
DOWNLOAD_URL=$DOWNLOAD_URL/mono | ||
fi | ||
GODOT_PACKAGE=$GODOT_BIN.zip | ||
wget $DOWNLOAD_URL/$GODOT_PACKAGE -P ${{ inputs.godot-cache-path }} | ||
unzip ${{ inputs.godot-cache-path }}/$GODOT_PACKAGE -d ${{ inputs.godot-cache-path }} | ||
if ${{runner.OS == 'Linux'}}; then | ||
echo "Run linux part" | ||
if ${{inputs.godot-mono == 'true'}}; then | ||
mv ${{ inputs.godot-cache-path }}/$GODOT_BIN/* ${{ inputs.godot-cache-path }}/ | ||
rm -rf ${{ inputs.godot-cache-path }}/$GODOT_BIN* | ||
mv ${{ inputs.godot-cache-path }}/Godot_v${{ inputs.godot-version }}* ${{ inputs.godot-cache-path }}/godot | ||
else | ||
mv ${{ inputs.godot-cache-path }}/$GODOT_BIN ${{ inputs.godot-cache-path }}/godot | ||
fi | ||
chmod u+x ${{ inputs.godot-cache-path }}/godot | ||
echo "${{ inputs.godot-cache-path }}/godot" | ||
else | ||
echo "Run windows part" | ||
pwd | ||
mv ${{ inputs.godot-cache-path }}/$GODOT_BIN ${{ inputs.godot-cache-path }}/godot.exe | ||
chmod u+x ${{ inputs.godot-cache-path }}/godot.exe | ||
${{ inputs.godot-cache-path }}/godot.exe --version | ||
echo "${{ inputs.godot-cache-path }}/godot.exe" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: publish-test-report | ||
description: "Publishes the GdUnit test results" | ||
|
||
inputs: | ||
report-name: | ||
description: "Name of the check run which will be created." | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: 'Fixing the dubious git 128 error' | ||
shell: bash | ||
run: | | ||
git config --global --add safe.directory '*' | ||
- name: 'Publish Test Results' | ||
uses: dorny/test-reporter@v1.6.0 | ||
with: | ||
name: test_report_${{ inputs.report-name }} | ||
path: 'reports/**/results.xml' | ||
reporter: java-junit | ||
fail-on-error: 'false' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: unit-test | ||
description: "Runs the unit tests on GdUnit4 API" | ||
|
||
inputs: | ||
test-includes: | ||
description: "The path to include tests to be run" | ||
required: true | ||
godot-bin: | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: "Unit Test Linux" | ||
if: ${{ runner.OS == 'Linux' }} | ||
env: | ||
GODOT_BIN: "/home/runner/godot-linux/godot" | ||
shell: bash | ||
run: | | ||
chmod +x ./addons/gdUnit4/runtest.sh | ||
xvfb-run --auto-servernum ./addons/gdUnit4/runtest.sh --add ${{ inputs.test-includes }} --audio-driver Dummy --display-driver x11 --rendering-driver opengl3 --screen 0 --continue --verbose | ||
# not tested yet | ||
- name: "Unit Test Windows cmd" | ||
if: ${{ runner.OS == 'Windows' }} | ||
env: | ||
GODOT_BIN: "C:\\Users\\runneradmin/godot-win/godot.exe" | ||
shell: cmd | ||
run: | | ||
echo "%HOMEPATH%" | ||
set unix_path=${{ inputs.godot-bin }} | ||
set win_path=%unix_path:~1% | ||
set win_path=%HOMEPATH%%unix_path:~1% | ||
set win_path=%win_path:/=\% | ||
echo "%win_path%" | ||
echo "%GODOT_BIN%" | ||
%GODOT_BIN% -s -d .\addons\gdUnit4\bin\GdUnitCmdTool.gd | ||
# chmod +x ./runtest.cmd | ||
# ./runtest.cmd --add ${{ inputs.test-includes }} --continue | ||
# set GODOT_BIN=%win_path% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: upload-test-report | ||
description: "Uploads the GdUnit test reports" | ||
|
||
inputs: | ||
report-name: | ||
description: "Name of the report to be upload." | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Collect Test Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test_report_${{ inputs.report-name }} | ||
path: reports/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: CI Godot 4 | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- godot4 | ||
pull_request: | ||
types: [opened, synchronize, reopened, closed] | ||
branches: | ||
- develop | ||
- main | ||
- godot4 | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
ADDON_NAME: godot-playfab | ||
GODOT_PLAYFAB_TEST_USER: ${{ secrets.GODOT_PLAYFAB_TEST_USER }} | ||
GODOT_PLAYFAB_TEST_PASSWORD: ${{ secrets.GODOT_PLAYFAB_TEST_PASSWORD }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
unit-test: | ||
name: "🤖 unit tests on Godot v${{ matrix.godot-version }}-${{ matrix.godot-status-version }} (${{ matrix.name }})" | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
godot-version: ['4.0.2', '4.0.3'] | ||
godot-status-version: ['stable'] | ||
include: | ||
- os: ubuntu-22.04 | ||
name: Godot 🐧 Linux Build | ||
godot-bin-name: 'linux.x86_64' | ||
godot-executable_path: '~/godot-linux/godot' | ||
godot-cache-path: '~/godot-linux' | ||
godot-mono: false | ||
install-opengl: false | ||
test-path: 'res://addons/godot-playfab/test/' | ||
|
||
steps: | ||
- name: "📦 Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "🤖 Install Godot ${{ matrix.godot-version }}" | ||
uses: ./.github/actions/godot-install | ||
with: | ||
godot-version: ${{ matrix.godot-version }} | ||
godot-status-version: ${{ matrix.godot-status-version }} | ||
godot-bin-name: ${{ matrix.godot-bin-name }} | ||
godot-cache-path: ${{ matrix.godot-cache-path }} | ||
|
||
- name: "♻️ Update Godot project cache" | ||
if: ${{ !cancelled() }} | ||
timeout-minutes: 1 | ||
continue-on-error: true # we still ignore the timeout, the script is not quit and we run into a timeout | ||
shell: bash | ||
run: | | ||
${{ matrix.godot-executable_path }} --version | ||
${{ matrix.godot-executable_path }} -e --path . -s res://addons/gdUnit4/bin/ProjectScanner.gd --headless | ||
- name: "🧪 Run Unit Tests" | ||
if: ${{ !cancelled() }} | ||
timeout-minutes: 10 | ||
uses: ./.github/actions/unit-test | ||
with: | ||
godot-bin: ${{ matrix.godot-executable_path }} | ||
test-includes: ${{ matrix.test-path }} | ||
|
||
#- name: "📚 Publish Unit Test Reports" | ||
# if: ${{ !cancelled() }} | ||
# uses: ./.github/actions/publish-test-report | ||
# with: | ||
# report-name: ${{ matrix.godot-build }}${{ matrix.godot-version }} | ||
|
||
#- name: "🎉 Upload Unit Test Reports" | ||
# if: ${{ !cancelled() }} | ||
# uses: ./.github/actions/upload-test-report | ||
# with: | ||
# report-name: ${{ matrix.godot-build }}${{ matrix.godot-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.