Update Molecule CI/CD workflow to avoid running plus tests on external PRs (#355)

This commit is contained in:
Alessandro Fael Garcia 2021-01-08 21:19:43 +01:00 committed by GitHub
parent 171e8300bb
commit 63e5182ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -32,14 +32,17 @@ jobs:
- source_centos
steps:
- name: Check out the codebase
if: "!(contains(matrix.scenario, 'plus') && github.event.pull_request.head.repo.full_name != github.repository)"
uses: actions/checkout@v2
- name: Set up Python 3
if: "!(contains(matrix.scenario, 'plus') && github.event.pull_request.head.repo.full_name != github.repository)"
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Molecule dependencies
if: "!(contains(matrix.scenario, 'plus') && github.event.pull_request.head.repo.full_name != github.repository)"
run: |
pip3 install ansible-base==2.10.3
pip3 install ansible==2.10.3
@ -49,8 +52,8 @@ jobs:
pip3 install docker==4.4.0
- name: Run Molecule tests
if: "!(contains(matrix.scenario, 'plus') && github.event.pull_request.head.repo.full_name != github.repository)"
run: molecule test -s ${{ matrix.scenario }}
if: contains(${{ matrix.scenario }}, "plus") && !(github.event_name == "pull_request" && github.event.pull_request.head.repo.fork)
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"

View File

@ -1,6 +1,12 @@
# Changelog
## 0.19.0 (Unreleased)
## 0.19.1 (Unreleased)
ENHANCEMENTS:
The GitHub actions Molecule CI/CD workflow should now correctly avoid running 'plus' related tests on external PRs.
## 0.19.0 (December 23, 2020)
BREAKING CHANGES: