-
Notifications
You must be signed in to change notification settings - Fork 6
93 lines (88 loc) · 3.25 KB
/
main.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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
# This is a basic workflow to help you get started with Actions
name: ci
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
# but only for the main branch
push:
branches: [main]
pull_request:
branches: ['*']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs
# that can run sequentially or in parallel
jobs:
ci:
env:
ARTIFACTORY_TOKEN: "${{ secrets.ARTIFACTORY_TOKEN }}"
ARTIFACTORY_REPO: "${{ secrets.ARTIFACTORY_REPO }}"
ARTIFACTORY_URL: "${{ secrets.ARTIFACTORY_URL }}"
CUSTOM_CHECKOUT_LOC: "repo"
python_ver: "3.10"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scenario:
- websphere-v90-rockylinux8
- db21158
- oracle19c-rockylinux8
- iim-191-rockylinux8
- ihs-v90-rockylinux8
- ohs-v12.2.1.4-rockylinux8
- liberty-rockylinux8
- liberty-jdk17-rockylinux8
- liberty-jdk21-rockylinux8
- weblogic-rockylinux8
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ env.CUSTOM_CHECKOUT_LOC }}
- name: Setup Python v${{ env.python_ver }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.python_ver }}
cache: 'pip'
# remove android and dotnet to gain more spaces for oracle installation
- name: Maximize build space
run: |
ls
ls -la "${{ env.CUSTOM_CHECKOUT_LOC }}"
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
df -h
- name: Install dependencies
run: |
cd ${{ env.CUSTOM_CHECKOUT_LOC }}
python -m pip install -U pip
python -m pip install -r ci-requirements.txt
- name: Prepare environment
run: |
cd ${{ env.CUSTOM_CHECKOUT_LOC }}
export COLLECTION_NAMESPACE=$(yq e '.namespace' galaxy.yml)
export COLLECTION_NAME=$(yq e '.name' galaxy.yml)
export COLLECTION_VERSION=$(yq e '.version' galaxy.yml)
export NEW_REPO_LOC=ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
echo "NEW_REPO_LOC=$NEW_REPO_LOC" >> $GITHUB_ENV
# export REPO_CLONE_FOLDERNAME=${PWD##*/}
# Create folder structure required by ansible-test and other tooling
cd ..
mkdir -p ansible_collections/$COLLECTION_NAMESPACE
mv ${{ env.CUSTOM_CHECKOUT_LOC }} ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
cd ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
ls -la
# Fake install cloned collection (required for molecule)
mkdir -p $HOME/.ansible/collections/$COLLECTION_NAMESPACE
ln -s ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME $HOME/.ansible/collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
# - name: Sanity checks
# run: |
# ansible-test sanity --docker -v --color --python ${{ env.python_ver }}
- name: Molecule
run: |
cd ${{ env.NEW_REPO_LOC }}
ls -la
molecule test -s ${{ matrix.scenario }}