2020-05-09 09:59:57 +02:00
|
|
|
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
|
2020-05-12 10:41:09 +02:00
|
|
|
run: cd build && ctest -V -R PyQgsDocCoverage
|
2020-05-09 09:59:57 +02:00
|
|
|
|
|
|
|
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
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
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
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
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
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
doxygen_layout_check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-05-12 07:31:37 +02:00
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y \
|
|
|
|
expect
|
2020-05-09 09:59:57 +02:00
|
|
|
- name: Doxygen Layout Test
|
|
|
|
run: ./tests/code_layout/test_doxygen_layout.sh
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
indentation_check:
|
2020-05-11 07:17:56 +02:00
|
|
|
if: github.event_name == 'pull_request'
|
2020-05-09 09:59:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-05-11 09:09:59 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 100
|
2020-05-11 15:35:52 +02:00
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y \
|
|
|
|
astyle \
|
|
|
|
python-autopep8 \
|
|
|
|
flip
|
2020-05-09 09:59:57 +02:00
|
|
|
- name: Indentation Test
|
2020-05-11 08:35:33 +02:00
|
|
|
run: ./scripts/verify_indentation.sh HEAD~1
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
spell_check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-08-31 17:09:06 +02:00
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y \
|
|
|
|
expect \
|
|
|
|
silversearcher-ag
|
2020-08-31 17:58:00 +02:00
|
|
|
- uses: trilom/file-changes-action@v1.2.4
|
2020-08-31 17:09:06 +02:00
|
|
|
id: changed_files
|
|
|
|
with:
|
2020-08-31 17:58:00 +02:00
|
|
|
output: ' '
|
|
|
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
2020-08-31 17:09:06 +02:00
|
|
|
- name: Spell Test
|
2020-08-31 17:58:00 +02:00
|
|
|
run: ./scripts/spell_check/check_spelling.sh -r ${{ steps.changed_files.outputs.files_modified }} ${{ steps.changed_files.outputs.files_added }}
|
2020-09-01 20:48:15 +02:00
|
|
|
|
2020-05-09 09:59:57 +02:00
|
|
|
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
|
2020-09-01 20:48:15 +02:00
|
|
|
run: ./tests/code_layout/test_sipfiles.sh
|
2020-06-01 21:44:39 +02:00
|
|
|
|
|
|
|
cppcheck_16_04:
|
|
|
|
runs-on: ubuntu-16.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y cppcheck
|
|
|
|
|
|
|
|
- name: Run cppcheck test
|
|
|
|
run: ./scripts/cppcheck.sh
|
|
|
|
|
|
|
|
cppcheck_18_04:
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Requirements
|
|
|
|
run: |
|
|
|
|
sudo apt install -y cppcheck
|
|
|
|
|
|
|
|
- name: Run cppcheck test
|
|
|
|
run: ./scripts/cppcheck.sh
|