Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 71a5476

Browse files
committed
init
0 parents  commit 71a5476

File tree

32 files changed

+1897
-0
lines changed

32 files changed

+1897
-0
lines changed

.github/workflows/integration.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Collection integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
# schedule:
9+
# - cron: 3 0 * * * # Run daily at 0:03 UTC
10+
11+
jobs:
12+
build-collection-artifact:
13+
name: Build collection
14+
runs-on: ${{ matrix.runner-os }}
15+
strategy:
16+
matrix:
17+
runner-os:
18+
- ubuntu-latest
19+
ansible-version:
20+
- git+https://github.com/ansible/ansible.git@devel
21+
runner-python-version:
22+
- 3.8
23+
steps:
24+
- uses: actions/checkout@v1
25+
- name: Set up Python ${{ matrix.runner-python-version }}
26+
uses: actions/setup-python@v1
27+
with:
28+
python-version: ${{ matrix.runner-python-version }}
29+
- name: Set up pip cache
30+
uses: actions/cache@v1
31+
with:
32+
path: ~/.cache/pip
33+
key: ${{ runner.os }}-pip-${{ github.ref }}
34+
- name: Install Ansible ${{ matrix.ansible-version }}
35+
run: >-
36+
python -m
37+
pip
38+
install
39+
--user
40+
${{ matrix.ansible-version }}
41+
- name: Build a collection tarball
42+
run: >-
43+
~/.local/bin/ansible-galaxy
44+
collection
45+
build
46+
--output-path
47+
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
48+
- name: Store migrated collection artifacts
49+
uses: actions/upload-artifact@v1
50+
with:
51+
name: >-
52+
collection
53+
path: .cache/collection-tarballs
54+
55+
sanity-test-collection-via-containers:
56+
name: Sanity in container via Python ${{ matrix.python-version }}
57+
needs:
58+
- build-collection-artifact
59+
runs-on: ${{ matrix.runner-os }}
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
runner-os:
64+
- ubuntu-latest
65+
runner-python-version:
66+
- 3.6
67+
ansible-version:
68+
- git+https://github.com/ansible/ansible.git@devel
69+
steps:
70+
- name: Set up Python ${{ matrix.runner-python-version }}
71+
uses: actions/setup-python@v1
72+
with:
73+
python-version: ${{ matrix.runner-python-version }}
74+
- name: Set up pip cache
75+
uses: actions/cache@v1
76+
with:
77+
path: ~/.cache/pip
78+
key: ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers
79+
restore-keys: |
80+
${{ runner.os }}-pip-
81+
${{ runner.os }}-
82+
- name: Install Ansible ${{ matrix.ansible-version }}
83+
run: >-
84+
python -m
85+
pip
86+
install
87+
--user
88+
${{ matrix.ansible-version }}
89+
- name: Download migrated collection artifacts
90+
uses: actions/download-artifact@v1
91+
with:
92+
name: >-
93+
collection
94+
path: .cache/collection-tarballs
95+
- name: Install the collection tarball
96+
run: >-
97+
~/.local/bin/ansible-galaxy
98+
collection
99+
install
100+
.cache/collection-tarballs/*.tar.gz
101+
- name: Run collection sanity tests
102+
run: >-
103+
~/.local/bin/ansible-test
104+
sanity
105+
--color
106+
--requirements
107+
--docker
108+
-vvv
109+
working-directory: >-
110+
/home/runner/.ansible/collections/ansible_collections/ngine_io/pingping

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Upload release to Galaxy
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install ansible
20+
- name: Build and publish
21+
env:
22+
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
23+
run: |
24+
ansible-galaxy collection build .
25+
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.tar.gz
2+
tests/output/

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Contributing
2+
3+
Any contribution is welcome and we only ask contributors to:
4+
5+
- Create an issues for any significant contribution that would change a large portion of the code base.
6+
- Provide at least integration tests for any contribution

0 commit comments

Comments
 (0)