CV/.gitlab/ci/cv-gitlab-ci.yml
Dan Anglin 95bd888c18
ci: add spell checking in CI pipeline
This commit adds a spell checking job to the testing
stage of the GitLab CI pipeline.
GNU Aspell is used to check the spelling of the JSON
CV.

The following changes are made in this commit:

- created a wrapper script that uses GNU Aspell to check
the word spellings in the CV. Errors are printed to the screen.
- created a make target to run the spellcheck script.
- created a new job in the test stage to run the new make target.
- create a custom word list for this project.
- corrections made in CV.
2020-02-08 13:56:21 +00:00

67 lines
1.3 KiB
YAML

---
.use-cv-builder:
image: ${IMAGE_NAME}:master-8b42c9fd
.test-conditions:
only:
refs:
- merge_requests
except:
changes:
- docker/Dockerfile
- __output/*
test:spellcheck:
before_script:
- apt-get update
- apt-get -y install aspell make
extends:
- .test-conditions
image: ubuntu:18.04
stage: test
script:
- make spellcheck
only:
refs:
- merge_requests
test:pdf:
artifacts:
expire_in: 1 hour
paths:
- __output/cv.pdf
extends:
- .use-cv-builder
- .test-conditions
before_script:
- make clean
stage: test
script:
- make
publish:pdf:
extends: .use-cv-builder
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 0400 ~/.ssh/known_hosts
- git remote set-url origin git@gitlab.com:${CI_PROJECT_PATH}.git
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git config --global user.name "${GITLAB_USER_NAME}"
- make clean
stage: publish
script:
- make
- git checkout master
- git add __output/cv.pdf
- 'git commit -m "auto: update CV."'
- git push origin master
only:
refs:
- master@dananglin/cv
except:
changes:
- docker/Dockerfile
- __output/*