-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework CI for merged roles #22
Comments
@D3DeFi I can include this on my PR with the changes as it seems we can use on:
push:
paths:
- 'sub-project/**'
- '!sub-project/docs/**' |
working example from one of my new collections name: "Role: ericsysmin.system.chrony Molecule Test"
on:
push:
paths:
- roles/chrony/**
- .github/workflows/chrony.yml
pull_request:
paths:
- roles/chrony/**
- .github/workflows/chrony.yml
jobs:
roles_test:
runs-on: ubuntu-18.04
env:
PY_COLORS: 1
ANSIBLE_FORCE_COLOR: 1
strategy:
fail-fast: false
matrix:
molecule_distro:
- distro: centos:7
command: /usr/sbin/init
- distro: centos:8
command: /usr/sbin/init
collection_role:
- chrony
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/ericsysmin/system
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt install docker
python -m pip install --upgrade pip
pip install molecule yamllint ansible-lint docker
- name: Run role test
run: >-
molecule --version &&
ansible --version &&
MOLECULE_COMMAND=${{ matrix.molecule_distro.command }}
MOLECULE_DISTRO=${{ matrix.molecule_distro.distro }}
molecule --debug test -s ${{ matrix.collection_role }} |
Oh that is great :) Yes, lets use that. |
I've assigned this task to @ericsysmin |
While doing the rework, I ran into this, so we'll likely need to fix it |
So, we have some problems with dependencies on Ansible Molecule that cause any role with dependencies to fail. We may need to merge with existing roles and stick with lint tests for now until Molecule has a new release. |
@ericsysmin can I do something to help with this? I am probably a bit lost. Is this some known bug when Molecule is testing a role residing in collection with external dependencies like |
Yes, that's the issue I ran into. So testing this is going to be hard until the issue is fixed on molecule. I had a PR for one of the issues but not enough people hit the other one I ran into, and there were a ton of new PR's being made so I wasn't sure if someone caught and fixed this one. I don't know how to fix this one, but did fix installing collections themselves. But geerlingguy.apache wasn't in a collection yet. |
Is it possible we schedule a meeting for like 30 minutes so we can discuss some items? |
We can give it a shot, hit me up on |
Sent. |
I'm sorry for leaving everything to you two. I appreciate it. |
@sky-joker the meeting was for everyone so we can also be on the same page. I was going to leave it to D3Defi to schedule as this is both of your repo. I'm just contributing. |
|
Already done |
SUMMARY
Current candidate - Github Actions from previous Travis CI. Example of working CI with Actions:
https://github.com/ericsysmin/ansible-collection-system/tree/master/.github/workflows
More information in:
Dependent on the completion of #20.
We should look at how the whole CI operates after this is solved. There is probably no need to run tests for plugins when a change to role occurs.
ISSUE TYPE
COMPONENT NAME
.github/workflows/roles.yml
The text was updated successfully, but these errors were encountered: