This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
Animate Scene Swapping #103
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
--- | |
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
schedule: | |
- cron: "0 14 * * 1" # Every Monday at 9 A.M. CST. | |
workflow_dispatch: | |
env: | |
CI: true | |
GODOT_VERSION: "4.2.1" | |
GDTOOLKIT_VERSION: "4.2.2" | |
DENO_VERSION: "v1.40.3" | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build | |
needs: [] | |
timeout-minutes: ${{ (matrix.target == 'web') && 5 || 10 }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- web | |
# - macos | |
include: | |
- target: web | |
os: ubuntu-latest | |
godot-flags: --export-release "Web" build/index.html | |
# - target: macos | |
# os: macos-latest | |
# godot-flags: --export-release "OS X" | |
steps: | |
- name: π Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: π€ Set up Godot | |
uses: chickensoft-games/setup-godot@d3fbddfbafb76fbce64d878aa3d31090e5d0fe0c # v1.5.6 | |
with: | |
version: ${{ env.GODOT_VERSION }} | |
use-dotnet: false | |
- name: π¬ Verify setup | |
run: godot --version | |
- name: π Make and delete directories | |
run: mkdir build/ && rm -rf addons/{godot-git-plugin,wakatime} | |
- name: π§ Build | |
run: godot --headless ${{ matrix.godot-flags }} | |
- name: βοΈ Upload build | |
if: matrix.target == 'web' | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: build-${{ matrix.target }} | |
path: "./build" | |
if-no-files-found: error | |
lint: | |
name: Linting | |
needs: [] | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: π€ Set up Godot | |
uses: Scony/godot-gdscript-toolkit@cbd7a1dcff14cd272787a4ca497c7ff328714a6c # master | |
with: | |
version: ${{ env.GDTOOLKIT_VERSION }} | |
- name: π¬ Verify setup | |
run: gdparse --version | |
- name: π΅οΈ Analyze project source | |
run: gdlint . | |
format: | |
name: Formatting | |
needs: [] | |
timeout-minutes: 3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: π€ Set up Godot | |
uses: Scony/godot-gdscript-toolkit@cbd7a1dcff14cd272787a4ca497c7ff328714a6c # master | |
with: | |
version: ${{ env.GDTOOLKIT_VERSION }} | |
- name: π¬ Verify setup | |
run: gdparse --version | |
- name: β¨ Verify formatting | |
run: gdformat --check $(find . -name '*.gd' -not -path "./addons/*") | |
check: | |
name: Check TS | |
needs: [] | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
permissions: | |
pull-requests: write # Needed for Biome PR comments. | |
steps: | |
- name: π Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: π¦ Install Deno | |
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- name: π΅οΈ Run linter, verify formatting, typecheck | |
run: deno task ci | |
- name: π§ͺ Run tests | |
run: deno task test | |
- name: π Collect coverage | |
run: deno task test:coverage | |
deploy: | |
name: Deploy to Deno Deploy | |
needs: [build, check] | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
permissions: | |
id-token: write # Needed to authenticate with Deno Deploy. | |
concurrency: | |
group: deploy-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: π Git checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: βοΈ Download build | |
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2 | |
with: | |
name: build-web | |
path: "./build" | |
- name: π§ Deploy | |
uses: denoland/deployctl@f21311b48f62f0063e3c729fc8a6a5dcdc4da7f9 # 1.10.3 | |
with: | |
project: "wizards-in-calculus" | |
entrypoint: server/server.ts | |
include: | | |
server | |
build | |
deno.json | |
deno.lock |