Skip to content

Update

Update #307

name: Check
on:
push:
branches:
- master
- releases/v[0-9]+.[0-9]+.[0-9]+
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
changed:
uses: ./.github/workflows/compute-changes.yml
check-codeblocks:
name: CodeBlocks
needs: changed
if: ${{ needs.changed.outputs.codeblocks_files == 'true' || needs.changed.outputs.game_code == 'true' || needs.changed.outputs.unit_tests == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Validate Code::Blocks project files
run: ./utils/check_codeblocks.sh
check_cmake:
name: CMake
needs: changed
if: ${{ needs.changed.outputs.cmake_files == 'true' || needs.changed.outputs.game_code == 'true' || needs.changed.outputs.unit_tests == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Validate CMake project files
run: ./utils/check_cmake.sh
validate_copyright:
name: Copyright
needs: changed
if: ${{ needs.changed.outputs.copyright == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install dependencies
run: python3 -m pip install --user python-debian
- name: Validate copyright file
run: python3 ./utils/check_copyright.py
spellcheck:
name: Spelling
needs: changed
if: ${{ needs.changed.outputs.data == 'true' || needs.changed.outputs.codespell == 'true' || needs.changed.outputs.changelog == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
show-progress: false
- uses: codespell-project/actions-codespell@master
with:
builtin: clear,en-GB_to_en-US
path: changelog data/
exclude_file: .codespell.exclude
ignore_words_file: .codespell.words.exclude
style_check:
name: Style
needs: changed
if: ${{ needs.changed.outputs.editorconfig_files == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker
check_coding_style:
name: Code Style
needs: changed
if: ${{ needs.changed.outputs.game_code == 'true' || needs.changed.outputs.unit_tests == 'true' || needs.changed.outputs.code_style_check == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install regex
- name: Run style checker
run: python ./utils/check_code_style.py
check_content_style:
name: Content Style
needs: changed
if: ${{ needs.changed.outputs.data == 'true' || needs.changed.outputs.content_style_check == 'true' || needs.changed.outputs.integration_tests == 'true' || needs.changed.outputs.content_style_script == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install regex
- name: Run style checker
run: python ./utils/check_content_style.py