mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-25 16:54:50 +00:00
108 lines
2.9 KiB
YAML
108 lines
2.9 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
BASENAME: "vorestation"
|
|
|
|
jobs:
|
|
file_tests:
|
|
name: Run Linters
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Ensure +x on CI directory
|
|
run: |
|
|
chmod -R +x ./tools/ci
|
|
- name: Install Tools
|
|
run: |
|
|
bash tools/ci/install_build_deps.sh
|
|
- name: Restore Yarn cache
|
|
if: "${{ contains(github.event.pull_request.labels.*.name, 'Type: TGUI Bundle') }}"
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: tgui/.yarn/cache
|
|
key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- name: Run Tests
|
|
run: |
|
|
tools/ci/validate_files.sh
|
|
tools/ci/build_tgui.sh
|
|
|
|
dreamchecker:
|
|
name: DreamChecker
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Cache SpacemanDMM
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/SpacemanDMM
|
|
key: ${{ runner.os }}-dreamchecker-${{ hashFiles('dependencies.sh')}}
|
|
restore-keys: ${{ runner.os }}-dreamchecker
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
tools/ci/install_spaceman_dmm.sh dreamchecker
|
|
|
|
- name: Run Linter
|
|
id: linter
|
|
run: |
|
|
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
|
|
|
|
- name: Annotate Linter
|
|
uses: yogstation13/DreamAnnotate@v1
|
|
if: always()
|
|
with:
|
|
outputFile: output-annotations.txt
|
|
|
|
unit_tests:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Ensure +x on CI directory
|
|
run: |
|
|
chmod -R +x ./tools/ci
|
|
- name: Setup Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: $HOME/BYOND
|
|
key: ${{ runner.os }}-byond
|
|
- name: Install RUST_G Dependencies
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt update || true
|
|
sudo apt install zlib1g-dev:i386 libssl-dev:i386
|
|
ldd librust_g.so
|
|
- name: Unit Tests
|
|
run: |
|
|
tools/ci/install_byond.sh
|
|
tools/ci/compile_and_run.sh
|
|
env:
|
|
TEST_DEFINE: "UNIT_TEST"
|
|
TEST_FILE: "code/_unit_tests.dm"
|
|
RUN: "1"
|
|
- name: Compile POIs
|
|
run: |
|
|
tools/ci/install_byond.sh
|
|
tools/ci/compile_and_run.sh
|
|
env:
|
|
TEST_DEFINE: "MAP_TEST"
|
|
TEST_FILE: "code/_map_tests.dm"
|
|
RUN: "0"
|
|
- name: Compile away missions
|
|
run: |
|
|
tools/ci/install_byond.sh
|
|
tools/ci/compile_and_run.sh
|
|
env:
|
|
TEST_DEFINE: "AWAY_MISSION_TEST"
|
|
TEST_FILE: "code/_away_mission_tests.dm"
|
|
RUN: "0"
|