.circleci/config.yml
version: 2
jobs:
test:
machine: true
parallelism: 4
steps:
- checkout
- run:
name: Setup
command: |
cp .env.test .env
make setup
- run:
name: Lint
command: make lint
- run:
name: Run React tests
command: |
TESTFILES=$(circleci tests glob "./src/**/*.test.js*" | circleci tests split)
make test-react FLAGS="--ci --silent --coverage" FILES="$(echo ${TESTFILES})"
- run:
name: Run Go tests
command: make test-go
- run:
name: Code coverage
command: make coverage
cloudgov:
machine: true
steps:
- checkout
- run:
name: Prepare for target environment
command: ./bin/predeploy.sh cloudgov
- run:
name: Setup
command: |
make setup
- run:
name: Build
command: make build
- run:
name: Checksum
command: make checksum
- deploy:
command: ./bin/deploy-cloudgov
workflows:
version: 2
build_and_deploy:
jobs:
- test
- cloudgov:
requires:
- test
filters:
branches:
only:
- master
- develop