forked from packit/ogr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recipe.yaml
66 lines (65 loc) · 1.7 KB
/
recipe.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
- name: This is a recipe for how to cook with ogr
hosts: all
vars:
project_dir: /src
with_testing: false
tasks:
- set_fact:
project_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
when: zuul is defined
- name: Install all packages needed to hack on ogr.
dnf:
name:
- make
- python3-flexmock
- python3-pip
- python3-setuptools
- git-core
- python3-setuptools_scm
- python3-setuptools_scm_git_archive
- python3-wheel # for bdist_wheel
- python3-pytest
- python3-tox
become: true
- name: Install latest twine for sake of check command
pip:
name:
- twine # we need newest twine, b/c of the check command
- readme_renderer[md]
state: latest
become: true
- name: Install requre
pip:
name:
- git+https://github.com/packit/requre
state: latest
become: true
- name: Install dependencies for git APIs
dnf:
name:
- python3-requests
- python3-pygithub
- python3-gitlab
state: present
become: true
- name: stat {{ project_dir }}
stat:
path: "{{ project_dir }}"
tags:
- no-cache
register: src_path
- name: Make sure {{ project_dir }} is present
assert:
that:
- src_path.stat.isdir
# this requires to have sources mounted inside at /src
- name: Install ogr from {{ project_dir }}
pip:
name: "{{ project_dir }}"
become: true
- name: Run tests
command: tox
args:
chdir: "{{ project_dir }}"
when: with_testing