-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (43 loc) · 1.69 KB
/
molecule.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
#name: Test the collection using Ansible Molecule
#on:
# push:
# branches:
# - 'main'
# pull_request:
#
#jobs:
# molecule:
# runs-on: testing-farm
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# python -m venv venv
# source venv/bin/activate
# python -m pip install --upgrade pip
# pip install -r requirements-testing.txt
# ansible-galaxy install -r requirements.yml
# ansible-galaxy install -r molecule/requirements.yml
# - name: Image mirroring
# run: |
# sed -f vm-testing/dev-images.sed -i roles/tas_single_node/defaults/main.yml
# - name: Run molecule
# env:
# TPA_SINGLE_NODE_REGISTRY_USERNAME: ${{ secrets.TPA_SINGLE_NODE_REGISTRY_USERNAME }}
# TPA_SINGLE_NODE_REGISTRY_PASSWORD: ${{ secrets.TPA_SINGLE_NODE_REGISTRY_PASSWORD }}
# TESTING_FARM_API_TOKEN: ${{ secrets.TESTING_FARM_API_TOKEN }}
# run: |
# eval $(ssh-agent -s) # testing-farm CLI right now mandates that ssh-agent is running
# source venv/bin/activate
# # ensure we wipe out any data potentially still on the runner from previous run
# molecule reset
# # NOTE: for now we don't run "molecule test", because we don't have proper idempotence yet
# molecule -v test --scenario-name default
# - name: Destroy molecule infrastructure
# env:
# TESTING_FARM_API_TOKEN: ${{ secrets.TESTING_FARM_API_TOKEN }}
# if: always()
# run:
# source venv/bin/activate
# molecule destroy