git-secret/.ci-tests/integration/tasks/run-tests.yml
nictrix 52dd244a73
add integration tests for alpine
adds a docker file for integration tests
update integration framework and tests to include alpine
update makefile to include apk builds for alpine
update build utils to include apk compatibility
changed a couple switch lines to be compatible with alpine
adds travis tests
2017-11-10 11:31:22 -07:00

68 lines
1.7 KiB
YAML

---
- name: Run ci-test
command: bash -lc "cd /tmp/git-secret && make test"
changed_when: False
ignore_errors: yes
register: test_results
environment:
PATH: /usr/local/bin:{{ ansible_env.PATH }}
- name: Print ci-test results
debug:
var: test_results.stdout_lines
- name: Create file when ci-test passes
file:
path: /.git-secret_test-passed
state: touch
when:
- test_results.rc == 0
- name: Run lint
command: bash -lc "cd /tmp/git-secret && make lint"
ignore_errors: yes
register: lint_results
changed_when: False
- name: Print lint results
debug:
var: lint_results.stdout_lines
- name: Create file when lint passes
file:
path: /.git-secret_lint-passed
state: touch
when:
- lint_results.rc == 0
- name: Create git-secret {{ os_pkg_type }} package
command: bash -lc "cd /tmp/git-secret && make build-{{ os_pkg_type }}"
changed_when: False
ignore_errors: yes
register: test_results
environment:
PATH: /usr/local/bin:{{ ansible_env.PATH }}
- name: Find git-secret {{ os_pkg_type }} file
find:
paths: /tmp/git-secret/build
patterns: "*.{{ os_pkg_type }}"
recurse: yes
register: pkg_location
- name: Set git-secret {{ os_pkg_type }} location
set_fact:
pkg_path: "{{ pkg_location.files | map(attribute='path') | first }}"
- name: Install git-secret {{ os_pkg_type }} package
command: bash -lc "{{ item.command }} {{ pkg_path }}"
when:
- item.os_family == ansible_os_family
with_items:
- command: "rpm --nodeps --install --force"
os_family: "RedHat"
- command: "dpkg --force-all --install"
os_family: "Debian"
- command: "apk add --allow-untrusted"
os_family: "Alpine"