-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
40 lines (39 loc) · 1.29 KB
/
action.yml
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
name: 'Package installation testing'
description: 'Test that given package can be installed from a given repo'
inputs:
repo_base_url:
description: 'base url to the rpm/yum/apt repository of NR'
required: true
package_name:
description: 'name of a package'
required: true
package_version:
description: 'version of a package that should be installed'
required: true
gpg_key:
description: 'gpg key to verify package signatures'
required: true
platforms:
description: 'comma separated list of platforms with version we want to run test for'
required: true
runs:
using: "composite"
steps:
- name: Configure Molecule and Ansible
shell: bash
run: |
python3 -m pip install -r ${GITHUB_ACTION_PATH}/requirements.txt
- name: Prepare OS versions
shell: bash
run: ${GITHUB_ACTION_PATH}/prepare_platform.sh ${{ inputs.platforms }}
- name: Run molecule
shell: bash
env:
REPO_BASE_URL: ${{ inputs.repo_base_url }}
PACKAGE_NAME: ${{ inputs.package_name }}
PACKAGE_VERSION: ${{ inputs.package_version }}
GPG_KEY: ${{ inputs.gpg_key }}
run: "cd ${GITHUB_ACTION_PATH} && molecule converge"
- name: Teardown
shell: bash
run: "cd ${GITHUB_ACTION_PATH} && molecule destroy"