chore(deps): bump fsfe/reuse-action from 2 to 3 #218
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
# SPDX-FileCopyrightText: 2021 Leroy Hopson <[email protected]> | |
# SPDX-License-Identifier: MIT | |
name: 'Test' | |
on: | |
push: | |
schedule: # Keep the cache alive! | |
- cron: 7 1 * * fri | |
jobs: | |
Test: | |
name: Test (${{ matrix.os }} ${{ matrix.version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
version: [ "v3.3-stable", "v3.4.4-stable", "v3.5-beta4" ] | |
exclude: | |
# This os/godot-version pair is flaky. | |
- version: "v3.3-stable" | |
os: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.13.0 | |
- name: Install npx | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: bash | |
run: npm i -g npx | |
- name: Start HTTP server | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: bash | |
run: npx http-server --port=7121 ./test/integration/streaming/ & | |
- name: Setup Godot | |
id: setup-godot | |
uses: lihop/setup-godot@v2 | |
with: | |
version: ${{ matrix.version }} | |
- name: Install plugins | |
shell: bash | |
run: godot --no-window -s plug.gd install | |
- name: Import files | |
shell: bash | |
run: godot --editor --quit | |
- name: Run unit tests | |
shell: bash | |
run: godot --no-window -s addons/gut/gut_cmdln.gd -gconfig=.gutconfig.json | |
- name: Run (some) integration tests | |
shell: bash | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: godot --no-window -s addons/gut/gut_cmdln.gd -gdir=res://test/integration/sources -gexit | |
reuse-compliance-check: | |
name: 'Check REUSE Compliance' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: REUSE Compliance Check | |
uses: fsfe/reuse-action@v3 | |
gdformat-check: | |
name: 'Check GDScript Format' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: GDFormat Check | |
run: | | |
python -m pip install -r requirements.txt | |
gdformat -c . | |
# Git archive should only include addons/glam directory. | |
check-archive: | |
name: 'Check Archive' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create git archive | |
run: git archive -o archive.zip HEAD | |
- name: Extract archive | |
run: mkdir -p /tmp/unzipped && unzip archive.zip -d /tmp/unzipped | |
- name: Copy extracted archive to working directory | |
run: cp -avr /tmp/unzipped ./unzipped | |
- name: REUSE compliance check | |
uses: fsfe/reuse-action@v3 | |
with: | |
args: --root ./unzipped/addons/glam lint | |
- name: Check that archive only contains addons directory | |
run: | | |
shopt -s nullglob dotglob | |
ls -laR /tmp/unzipped | |
files=(/tmp/unzipped/*) | |
if [ ${#files[@]} -ne 1 ]; then | |
echo "Wrong number of files in archive (${#files[@]}) expected 1." | |
exit 1 | |
fi | |
if [ ! -d "/tmp/unzipped/addons" ]; then | |
echo "Expected directory (addons) not found." | |
exit 1 | |
fi | |
files=(/tmp/unzipped/addons) | |
if [ ${#files[@]} -ne 1 ]; then | |
echo "Wrong number of files in addons directory (${#files[@]}) expected 1." | |
exit 1 | |
fi | |
if [ ! -d "/tmp/unzipped/addons/glam" ]; then | |
echo "Expected directory (addons/glam) not found." | |
exit 1 | |
fi |