Skip to content
Snippets Groups Projects
Unverified Commit d5a8101d authored by Ben Kochie's avatar Ben Kochie
Browse files

Run tests in CircleCI

Switch from Travis to CircleCI for testing.

https://github.com/cloudalchemy/auto-maintenance/issues/2



Signed-off-by: default avatarBen Kochie <superq@gmail.com>
parent df491c67
No related branches found
No related tags found
No related merge requests found
---
version: 2.1
executors:
python:
docker:
- image: cimg/python:3.9
jobs:
test:
executor: python
parameters:
ansible:
type: string
environment:
ANSIBLE: "<< parameters.ansible >>"
steps:
- checkout
- setup_remote_docker
- run: ln -s ~/project ~/${CIRCLE_PROJECT_REPONAME}
- run: pip install -r test-requirements.txt
- run: molecule test -s default --destroy always
- run: |
if [[ -d 'molecule/alternative' ]]; then
molecule test -s alternative --destroy never
else
echo 'No alternative test'
fi
- run: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then
molecule test -s latest --destroy never
else
echo 'Not running latest on PR'
fi
workflows:
version: 2
molecule:
jobs:
- test:
matrix:
parameters:
ansible:
- "2.9"
- "2.10"
filters:
tags:
only: /.*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment