lohit-devanagari-fonts/tests/test_simple.yml
2023-07-10 08:45:13 +02:00

38 lines
1005 B
YAML

---
- hosts: localhost
vars:
- artifacts: ./artifacts
tags:
- atomic
- classic
- container
remote_user: root
tasks:
- name: Create the folder where we will store the tests
action: file state=directory path={{ item }}
owner=root group=root
with_items:
- /usr/local/bin
- name: Install the test files
copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }}
mode=0755
with_items:
- {file: func/auto_test.py, dest: auto_test.py }
- {file: func/std-test-out.txt, dest: std-test-out.txt }
- {file: func/Makefile, dest: Makefile }
- name: Make artifacts directory
file: path={{ artifacts }} state=directory owner=root mode=755 recurse=yes
- name: Test execution
block:
- name: Execute the tests
shell: exec > {{ artifacts }}/output && cd /usr/local/bin/ && make test 2>&1
always:
- name: Pull out the logs
fetch:
dest: "{{ artifacts }}/"
src: "{{ artifacts }}/"