mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
[workflows] Add code_layout tests
This commit is contained in:
parent
e05ad8a2ad
commit
77318730a8
147
.github/workflows/code_layout.yml
vendored
Normal file
147
.github/workflows/code_layout.yml
vendored
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
name: Code Layout
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
documentation_checks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up Python 3.7
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt install -y \
|
||||||
|
doxygen \
|
||||||
|
cpanminus \
|
||||||
|
libyaml-tiny-perl \
|
||||||
|
libio-socket-ssl-perl \
|
||||||
|
libhttp-date-perl \
|
||||||
|
libgetopt-long-descriptive-perl \
|
||||||
|
libmoo-perl \
|
||||||
|
libnamespace-clean-perl \
|
||||||
|
libpath-tiny-perl \
|
||||||
|
libpod-constants-perl \
|
||||||
|
libscalar-list-utils-perl \
|
||||||
|
libsort-key-perl \
|
||||||
|
libstrictures-perl \
|
||||||
|
libstring-escape-perl \
|
||||||
|
libtry-tiny-perl \
|
||||||
|
expect
|
||||||
|
cpanm --notest App::Licensecheck
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install autopep8 nose2 mock termcolor
|
||||||
|
- name: Make
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DWITH_SERVER=ON -DUSE_CCACHE=OFF -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON -DWITH_DOT=NO ..
|
||||||
|
make -j3
|
||||||
|
- name: Run Tests
|
||||||
|
run: cd build && ctest -R doc
|
||||||
|
|
||||||
|
license_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt install -y \
|
||||||
|
cpanminus
|
||||||
|
cpanm --notest App::Licensecheck
|
||||||
|
|
||||||
|
- name: Run License Check
|
||||||
|
run: ./tests/code_layout/test_licenses.sh
|
||||||
|
|
||||||
|
shell_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt install -y \
|
||||||
|
shellcheck
|
||||||
|
|
||||||
|
- name: Run Shellcheck
|
||||||
|
run: ./tests/code_layout/test_shellcheck.sh
|
||||||
|
|
||||||
|
banned_keywords_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run Banned Keywords Test
|
||||||
|
run: ./tests/code_layout/test_banned_keywords.sh
|
||||||
|
|
||||||
|
def_window_title_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Def Window Title Test
|
||||||
|
run: ./tests/code_layout/test_defwindowtitle.sh
|
||||||
|
|
||||||
|
doxygen_layout_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Doxygen Layout Test
|
||||||
|
run: ./tests/code_layout/test_doxygen_layout.sh
|
||||||
|
|
||||||
|
indentation_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Indentation Test
|
||||||
|
run: ./scripts/verify_indentation.sh
|
||||||
|
|
||||||
|
spell_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Indentation Test
|
||||||
|
run: ./scripts/spell_check/spell_test.sh
|
||||||
|
|
||||||
|
sip_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Python 3.7
|
||||||
|
uses: actions/setup-python@v1
|
||||||
|
with:
|
||||||
|
python-version: 3.7
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt install -y \
|
||||||
|
cpanminus \
|
||||||
|
libyaml-tiny-perl \
|
||||||
|
libio-socket-ssl-perl \
|
||||||
|
libhttp-date-perl \
|
||||||
|
libgetopt-long-descriptive-perl \
|
||||||
|
libmoo-perl \
|
||||||
|
libnamespace-clean-perl \
|
||||||
|
libpath-tiny-perl \
|
||||||
|
libpod-constants-perl \
|
||||||
|
libscalar-list-utils-perl \
|
||||||
|
libsort-key-perl \
|
||||||
|
libstrictures-perl \
|
||||||
|
libstring-escape-perl \
|
||||||
|
libtry-tiny-perl \
|
||||||
|
expect
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install autopep8 nose2 mock termcolor
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Sip Checks
|
||||||
|
run: ./tests/code_layout/test_sipify.sh
|
||||||
|
- name: Sip Include Test
|
||||||
|
run: ./tests/code_layout/test_sip_include.sh
|
||||||
|
- name: Sip Files Up To Date
|
||||||
|
run: ./tests/code_layout/test_sipfiles_uptodate.sh
|
@ -2143,7 +2143,7 @@ PERL_PATH = /usr/bin/env perl
|
|||||||
# powerful graphs.
|
# powerful graphs.
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
CLASS_DIAGRAMS = YES
|
CLASS_DIAGRAMS = @HAVE_DOT@
|
||||||
|
|
||||||
# You can define message sequence charts within doxygen comments using the \msc
|
# You can define message sequence charts within doxygen comments using the \msc
|
||||||
# command. Doxygen will then run the mscgen tool (see:
|
# command. Doxygen will then run the mscgen tool (see:
|
||||||
@ -2174,7 +2174,7 @@ HIDE_UNDOC_RELATIONS = YES
|
|||||||
# set to NO
|
# set to NO
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = @HAVE_DOT@
|
||||||
|
|
||||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||||
|
@ -180,6 +180,8 @@ IF(WITH_APIDOC)
|
|||||||
IF(GENERATE_QHP)
|
IF(GENERATE_QHP)
|
||||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch DESTINATION ${QGIS_DATA_DIR}/doc/api)
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch DESTINATION ${QGIS_DATA_DIR}/doc/api)
|
||||||
ENDIF(GENERATE_QHP)
|
ENDIF(GENERATE_QHP)
|
||||||
|
SET(WITH_DOT YES CACHE STRING "Determines if the dot application should be used to generate class diagrams for the documentation")
|
||||||
|
MARK_AS_ADVANCED(WITH_DOT)
|
||||||
ELSE(DOXYGEN_FOUND)
|
ELSE(DOXYGEN_FOUND)
|
||||||
MESSAGE(STATUS "QGIS api documentation not built - Doxygen not found")
|
MESSAGE(STATUS "QGIS api documentation not built - Doxygen not found")
|
||||||
ENDIF(DOXYGEN_FOUND)
|
ENDIF(DOXYGEN_FOUND)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user