add sqflint to circleci (#6715)

* add sqflint to circleci

* lint working directory

* do not exit with 1 on errors

* split up build jobs

* change linting not to be required

* use armake docker image for updating docs
This commit is contained in:
Thomas Kooi
2018-12-04 18:45:45 +01:00
committed by GitHub
parent 24e1bffe80
commit 30769f9428

View File

@ -1,13 +1,28 @@
version: 2 version: 2
jobs: jobs:
build: validate-scripts:
docker: docker:
- image: acemod/armake:master - image: acemod/sqflint:latest
steps: steps:
- checkout - checkout
- run: - run:
name: Validate SQF and Config style name: Validate SQF and Config style
command: python tools/sqf_validator.py && python tools/config_style_checker.py command: python tools/sqf_validator.py && python tools/config_style_checker.py
linting:
docker:
- image: acemod/sqflint:latest
steps:
- checkout
- run:
name: Lint sqf code
command: sqflint -d addons || true
armake:
docker:
- image: acemod/armake:master
steps:
- checkout
- run: - run:
name: Version name: Version
command: armake --version command: armake --version
@ -15,12 +30,34 @@ jobs:
name: Build name: Build
command: | command: |
make -j 4 make -j 4
- deploy:
update-docs:
docker:
- image: acemod/armake:latest
steps:
- checkout
- run:
name: Update documentation and translation statistics name: Update documentation and translation statistics
command: | command: |
if [ "${CIRCLE_BRANCH}" == "master" ] && [ "${CIRCLE_PROJECT_USERNAME}" == "acemod" ]; then if [ "${CIRCLE_BRANCH}" == "master" ] && [ "${CIRCLE_PROJECT_USERNAME}" == "acemod" ]; then
pip install pygithub pygithub3 pip install pygithub pygithub3
python3 tools/deploy.py python3 tools/deploy.py
else else
echo "Skipping, not on acemod/ACE3 master branch..." echo "Skipping, not on acemod/ACE3 master branch..."
fi fi
workflows:
version: 2
build-job:
jobs:
- linting
- validate-scripts
- armake:
requires:
- validate-scripts
- update-docs:
requires:
- armake
filters:
branches:
only: master