This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 71a5476
Showing
32 changed files
with
1,897 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,110 @@ | ||
name: Collection integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
# schedule: | ||
# - cron: 3 0 * * * # Run daily at 0:03 UTC | ||
|
||
jobs: | ||
build-collection-artifact: | ||
name: Build collection | ||
runs-on: ${{ matrix.runner-os }} | ||
strategy: | ||
matrix: | ||
runner-os: | ||
- ubuntu-latest | ||
ansible-version: | ||
- git+https://github.com/ansible/ansible.git@devel | ||
runner-python-version: | ||
- 3.8 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.runner-python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.runner-python-version }} | ||
- name: Set up pip cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ github.ref }} | ||
- name: Install Ansible ${{ matrix.ansible-version }} | ||
run: >- | ||
python -m | ||
pip | ||
install | ||
--user | ||
${{ matrix.ansible-version }} | ||
- name: Build a collection tarball | ||
run: >- | ||
~/.local/bin/ansible-galaxy | ||
collection | ||
build | ||
--output-path | ||
"${GITHUB_WORKSPACE}/.cache/collection-tarballs" | ||
- name: Store migrated collection artifacts | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: >- | ||
collection | ||
path: .cache/collection-tarballs | ||
|
||
sanity-test-collection-via-containers: | ||
name: Sanity in container via Python ${{ matrix.python-version }} | ||
needs: | ||
- build-collection-artifact | ||
runs-on: ${{ matrix.runner-os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runner-os: | ||
- ubuntu-latest | ||
runner-python-version: | ||
- 3.6 | ||
ansible-version: | ||
- git+https://github.com/ansible/ansible.git@devel | ||
steps: | ||
- name: Set up Python ${{ matrix.runner-python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.runner-python-version }} | ||
- name: Set up pip cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
- name: Install Ansible ${{ matrix.ansible-version }} | ||
run: >- | ||
python -m | ||
pip | ||
install | ||
--user | ||
${{ matrix.ansible-version }} | ||
- name: Download migrated collection artifacts | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: >- | ||
collection | ||
path: .cache/collection-tarballs | ||
- name: Install the collection tarball | ||
run: >- | ||
~/.local/bin/ansible-galaxy | ||
collection | ||
install | ||
.cache/collection-tarballs/*.tar.gz | ||
- name: Run collection sanity tests | ||
run: >- | ||
~/.local/bin/ansible-test | ||
sanity | ||
--color | ||
--requirements | ||
--docker | ||
-vvv | ||
working-directory: >- | ||
/home/runner/.ansible/collections/ansible_collections/ngine_io/pingping |
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,25 @@ | ||
name: Upload release to Galaxy | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ansible | ||
- name: Build and publish | ||
env: | ||
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }} | ||
run: | | ||
ansible-galaxy collection build . | ||
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY |
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,2 @@ | ||
*.tar.gz | ||
tests/output/ |
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,6 @@ | ||
# Contributing | ||
|
||
Any contribution is welcome and we only ask contributors to: | ||
|
||
- Create an issues for any significant contribution that would change a large portion of the code base. | ||
- Provide at least integration tests for any contribution |
Oops, something went wrong.