|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +jobs: |
| 17 | + godot: |
| 18 | + name: Godot lint & tests |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Checkout |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Setup Godot |
| 25 | + uses: chickensoft-games/setup-godot@f166999204a4f2722c6fe042fbaa3b3ea0d9c789 |
| 26 | + with: |
| 27 | + version: 4.6.1 |
| 28 | + use-dotnet: false |
| 29 | + include-templates: false |
| 30 | + |
| 31 | + - name: Setup Python |
| 32 | + uses: actions/setup-python@v5 |
| 33 | + with: |
| 34 | + python-version: "3.11" |
| 35 | + |
| 36 | + - name: Install GDScript tooling |
| 37 | + run: pip install -r requirements-dev.txt |
| 38 | + |
| 39 | + - name: Install GDScript formatter |
| 40 | + run: ./scripts/install-gdscript-formatter.sh |
| 41 | + |
| 42 | + - name: Check formatting |
| 43 | + run: .tools/gdscript-formatter --check src tests |
| 44 | + |
| 45 | + - name: Lint |
| 46 | + run: gdlint src tests |
| 47 | + |
| 48 | + - name: Run Godot tests |
| 49 | + run: ./scripts/test-godot.sh |
| 50 | + |
| 51 | + godot-e2e: |
| 52 | + name: Godot E2E |
| 53 | + runs-on: ubuntu-latest |
| 54 | + timeout-minutes: 5 |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v4 |
| 58 | + |
| 59 | + - name: Setup Godot |
| 60 | + uses: chickensoft-games/setup-godot@f166999204a4f2722c6fe042fbaa3b3ea0d9c789 |
| 61 | + with: |
| 62 | + version: 4.6.1 |
| 63 | + use-dotnet: false |
| 64 | + include-templates: false |
| 65 | + |
| 66 | + - name: Setup Python |
| 67 | + uses: actions/setup-python@v5 |
| 68 | + with: |
| 69 | + python-version: "3.11" |
| 70 | + |
| 71 | + - name: Run Deathmatch E2E |
| 72 | + run: ./scripts/test-e2e.sh |
| 73 | + |
| 74 | + - name: Upload E2E artifacts |
| 75 | + if: failure() |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: e2e-artifacts |
| 79 | + path: artifacts/e2e/ |
| 80 | + |
| 81 | + server: |
| 82 | + name: Server |
| 83 | + runs-on: ubuntu-latest |
| 84 | + defaults: |
| 85 | + run: |
| 86 | + working-directory: server |
| 87 | + steps: |
| 88 | + - name: Checkout |
| 89 | + uses: actions/checkout@v4 |
| 90 | + |
| 91 | + - name: Setup Node |
| 92 | + uses: actions/setup-node@v4 |
| 93 | + with: |
| 94 | + node-version: 22 |
| 95 | + |
| 96 | + - name: Enable corepack |
| 97 | + run: corepack enable |
| 98 | + |
| 99 | + - name: Install dependencies |
| 100 | + run: pnpm install --frozen-lockfile |
| 101 | + |
| 102 | + - name: Quality |
| 103 | + run: pnpm quality |
| 104 | + |
| 105 | + - name: Test |
| 106 | + run: pnpm test |
| 107 | + |
| 108 | + - name: Build |
| 109 | + run: pnpm build |
| 110 | + |
| 111 | + website: |
| 112 | + name: Website |
| 113 | + runs-on: ubuntu-latest |
| 114 | + defaults: |
| 115 | + run: |
| 116 | + working-directory: website |
| 117 | + steps: |
| 118 | + - name: Checkout |
| 119 | + uses: actions/checkout@v4 |
| 120 | + |
| 121 | + - name: Setup Node |
| 122 | + uses: actions/setup-node@v4 |
| 123 | + with: |
| 124 | + node-version: 22 |
| 125 | + |
| 126 | + - name: Enable corepack |
| 127 | + run: corepack enable |
| 128 | + |
| 129 | + - name: Install dependencies |
| 130 | + run: pnpm install --frozen-lockfile |
| 131 | + |
| 132 | + - name: Build |
| 133 | + run: pnpm build |
0 commit comments