fontpackages/tests/tests.yml
2023-07-10 08:50:32 +02:00

34 lines
866 B
YAML

- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
tasks:
- name: Install required packages
dnf:
name:
- lohit-devanagari-fonts
- name: Install the test files
copy: src={{ item.file }} dest=/tmp/{{ item.dest }} mode=0755
with_items:
- {file: runtests.sh, dest: runtests.sh }
- name: Test block
block:
- name: Execute the tests
shell: |
/tmp/runtests.sh &> /tmp/test.log && result=pass || result=fail
echo -e "results:\n- {result: $result, test: simple}" > /tmp/results.yml
always:
- name: Pull out the logs
fetch:
dest: "{{ artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/results.yml