From 0976c53d32794f15cb64c46939bd8e32443ffc06 Mon Sep 17 00:00:00 2001 From: Andrew Qi Date: Thu, 23 Apr 2026 22:06:15 +0800 Subject: [PATCH] chore(ci): modified CI for Godot stage (#1716) ## Description This PR adds basic CI for Godot stage via ci.yml. --------- Co-authored-by: Neko Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Qi Co-authored-by: github-actions[bot] --- .github/workflows/ci.yml | 34 +++++++++++++++++-- .../scripts/StageRoot.cs | 18 +++++----- nix/pnpm-deps-hash.txt | 2 +- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54b775bc5..54da736c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ name: CI - on: push: branches: @@ -23,6 +22,20 @@ jobs: node-version: lts/* cache: pnpm + # Setup .NET for Godot C# linting + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + # Lint Godot C# code + - name: Lint Godot C# + working-directory: ./engines/stage-tamagotchi-godot + run: dotnet format stage-tamagotchi-godot.sln --verify-no-changes + + - run: docker run -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:latest + working-directory: ./apps/stage-pocket + - run: pnpm install --frozen-lockfile - run: pnpm run lint - run: docker run -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:latest @@ -39,6 +52,9 @@ jobs: - app_name: stage-tamagotchi command: pnpm -F @proj-airi/stage-tamagotchi run build + + - app_name: stage-tamagotchi-godot + command: cd engines/stage-tamagotchi-godot && dotnet restore && dotnet build -c ExportRelease - app_name: ui-transitions command: pnpm -F @proj-airi/ui-transitions run play:build @@ -65,6 +81,20 @@ jobs: node-version: lts/* cache: pnpm + # Setup .NET and Godot + - name: Setup .NET + if: matrix.app_name == 'stage-tamagotchi-godot' + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Setup Godot + if: matrix.app_name == 'stage-tamagotchi-godot' + uses: chickensoft-games/setup-godot@v2 + with: + version: 4.6.1 + use-dotnet: true + - run: pnpm install --frozen-lockfile - run: pnpm run build:packages @@ -103,4 +133,4 @@ jobs: # base-ref: origin/main # optional, default: origin/main # fail-on-downgrade: true # optional, default: true - name: Print result - run: "echo 'Downgraded: ${{ steps.check.outputs.downgraded }}'" + run: "echo 'Downgraded: ${{ steps.check.outputs.downgraded }}'" \ No newline at end of file diff --git a/engines/stage-tamagotchi-godot/scripts/StageRoot.cs b/engines/stage-tamagotchi-godot/scripts/StageRoot.cs index 50c737c00..5405cf0ab 100644 --- a/engines/stage-tamagotchi-godot/scripts/StageRoot.cs +++ b/engines/stage-tamagotchi-godot/scripts/StageRoot.cs @@ -3,14 +3,14 @@ using System; public partial class StageRoot : Node3D { - // Called when the node enters the scene tree for the first time. - public override void _Ready() - { - GD.Print("StageRoot ready"); - } + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + GD.Print("StageRoot ready"); + } - // Called every frame. 'delta' is the elapsed time since the previous frame. - public override void _Process(double delta) - { - } + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + } } diff --git a/nix/pnpm-deps-hash.txt b/nix/pnpm-deps-hash.txt index 4d7ee7f35..7de0e884e 100644 --- a/nix/pnpm-deps-hash.txt +++ b/nix/pnpm-deps-hash.txt @@ -1 +1 @@ -sha256-sOCzqmdqoVMdsgMxGqkqo/KhIJqYG8YUqCJk5mEt+zo= +sha256-hlT6X3EXKhonLweNt0GbC7jdu0HIxyXO+BYUNrZoEUI=