-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using sanity checks as CI testing is a good practice for community package collections[1]. Add initially without stopping CI to find the errors that need to be fixed an once they are cleaned, enable them. [1] https://docs.ansible.com/ansible/latest/community/collection_contributors/collection_requirements.html#ci-testing
- Loading branch information
1 parent
592664c
commit d5f4f2d
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Ansible Galaxy Publish | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
sanity: | ||
name: Sanity Check | ||
strategy: | ||
matrix: | ||
ansible: | ||
- stable-2.9 | ||
- stable-2.15 | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ansible_collection/${{ github.repository }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install ansible-base ${{ matrix.ansible }} | ||
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check | ||
|
||
# Always succeeding sanity test until all errors are fixed | ||
- name: Run sanity test | ||
run: ansible-test sanity -v --docker --color --coverage || true | ||
working-directory: ansible_collection/${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.tar.gz |