Skip to content

Commit 108f05f

Browse files
committed
github: Add GUT tests job
Rename the pre-commit workflow to the more generic "checks" and add a job to run GUT. This makes use of the chickensoft-games/setup-godot action to download and cache Godot for Linux.
1 parent 4e7f034 commit 108f05f

File tree

2 files changed

+40
-21
lines changed

2 files changed

+40
-21
lines changed

.github/workflows/checks.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
pre-commit:
11+
name: Linting and Formatting
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
- name: set PY
17+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
18+
- uses: actions/cache@v4
19+
with:
20+
path: ~/.cache/pre-commit
21+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
22+
- uses: pre-commit/action@v3.0.1
23+
24+
tests:
25+
name: Tests
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Setup Godot
31+
uses: chickensoft-games/setup-godot@v2.0.1
32+
with:
33+
version: 4.2.2
34+
use-dotnet: false
35+
- name: Initialize Godot
36+
run: |
37+
godot --path . --headless --import
38+
- name: Run tests
39+
run: |
40+
godot --path . --headless --script addons/gut/gut_cmdln.gd -gexit

.github/workflows/pre-commit.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)