Blob Blame History Raw
- hosts: localhost
  vars:
    config:
      fontname: lohit-nepali
      lang: ["bh","bho","hi","kok","mr","ne","sa","hne","mai","brx","sat","doi"]
      testgiturl: https://pagure.io/font_ci_testing.git
      testgitclonepath: fonttest
      testfilename: fonttest.py
      testfilepath: /usr/local/bin
      logfilepath: /tmp/test.log
      artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
      
  tags:
  - classic

  remote_user: root

  tasks:
  - name: Install required package
    dnf:
      name:
      - git 
      - "{{ config.fontname }}-fonts"
      - python3
      - fontconfig

  - name: git clone the tests
    git:
      repo: "{{ config.testgiturl }}" 
      dest: "{{ config.testgitclonepath }}"
      force: yes

  - name: Test Execution
    block:
      - name: Execute the tests
        command: python3 {{ config.testgitclonepath }}/tests/{{ config.testfilename }} "{{ config }}"

    always:
      - name: Pull out the artifacts
        fetch:
          dest: "{{ config.artifacts }}/"
          src: "{{ item }}"
          flat: yes
        with_items:
          - "{{ config.logfilepath }}"