Merge "haskell-stack-test: add build target job variable"
This commit is contained in:
commit
1ab22a3b44
@ -2,6 +2,10 @@ Run the Haskell stack test command.
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: haskell_stack_target
|
||||
|
||||
The stack target(s) to test.
|
||||
|
||||
.. zuul:rolevar:: lts_version
|
||||
|
||||
The lts version.
|
||||
|
@ -1,2 +1,7 @@
|
||||
haskell_stack_target: ""
|
||||
lts_version: ""
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||
|
||||
_stack_resolver_args: "{% if lts_version %}--resolver {{ lts_version }}{% endif %}"
|
||||
_stack_build_args: "{{ _stack_resolver_args }} --test --no-run-tests {{ haskell_stack_target }}"
|
||||
_stack_test_args: "{{ _stack_resolver_args }} {{ haskell_stack_target }}"
|
||||
|
@ -1,4 +1,9 @@
|
||||
- name: Run stack test
|
||||
command: "stack {% if lts_version %}--resolver {{ lts_version }}{% endif %} test"
|
||||
- name: Run stack build {{ _stack_build_args }}
|
||||
command: "stack build {{ _stack_build_args }}"
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
|
||||
- name: Run stack test {{ _stack_test_args }}
|
||||
command: "stack test {{ _stack_test_args }}"
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}"
|
||||
|
@ -22,6 +22,10 @@
|
||||
description: |
|
||||
Run stack test for a Haskell project.
|
||||
|
||||
.. zuul:jobvar:: haskell_stack_target
|
||||
|
||||
The stack target(s) to test.
|
||||
|
||||
.. zuul:jobvar:: lts_version
|
||||
|
||||
Use the specified lts version.
|
||||
|
Loading…
Reference in New Issue
Block a user