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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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