Skip to content

Orautostart (#78)

Orautostart (#78) #253

Workflow file for this run

---
# 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-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 }}