Skip to content

Commit a70bb3b

Browse files
authored
cleanup .github folder and files (#275)
1 parent 2ea1741 commit a70bb3b

File tree

5 files changed

+193
-60
lines changed

5 files changed

+193
-60
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Report a reproducible bug in the current release of networktocode.netauto collection
4+
---
5+
6+
### Environment
7+
* Ansible version: <!-- Example: 2.9.2 -->
8+
* Python version: <!-- Example: 3.7.7 -->
9+
* Pyntc version: <!-- Example: 1.0.0 -->
10+
* networktocode.netauto collection version: <!-- Example: 1.0.0 -->
11+
12+
13+
<!-- What did you expect to happen? -->
14+
### Expected Behavior
15+
16+
17+
<!-- What happened instead? -->
18+
### Observed Behavior
19+
20+
<!--
21+
Describe in detail the exact steps that someone else can take to reproduce
22+
this bug using the current release.
23+
-->
24+
### Steps to Reproduce
25+
1.
26+
2.
27+
3.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: ✨ Feature Request
3+
about: Propose a new feature or enhancement
4+
5+
---
6+
7+
### Environment
8+
* Ansible version: <!-- Example: 2.9.2 -->
9+
* networktocode.netauto collection version: <!-- Example: 1.0.0 -->
10+
11+
<!--
12+
Describe in detail the new functionality you are proposing.
13+
-->
14+
### Proposed Functionality
15+
16+
<!--
17+
Convey an example use case for your proposed feature. Write from the
18+
perspective of a user who would benefit from the proposed
19+
functionality and describe how.
20+
--->
21+
### Use Case

.github/ISSUE_TEMPLATE/new-issue.md

-60
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## New Pull Request
2+
3+
Have you:
4+
- [ ] Updated the README if necessary?
5+
- [ ] Updated any configuration settings?
6+
- [ ] Written a unit test?
7+
8+
## Change Notes
9+
10+
## Justification

.github/workflows/ci.yml

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
name: "CI"
3+
on: # yamllint disable
4+
push:
5+
branches:
6+
- "develop"
7+
- "main"
8+
pull_request:
9+
release:
10+
types: [published]
11+
schedule:
12+
- cron: "20 3 * * 1"
13+
14+
jobs:
15+
lint:
16+
runs-on: "ubuntu-20.04"
17+
steps:
18+
- name: "Check out repository code"
19+
uses: "actions/checkout@v2"
20+
- name: "Install invoke"
21+
run: "pip install -U pip && pip install invoke"
22+
- name: "Linting"
23+
run: "invoke lint"
24+
test:
25+
runs-on: "ubuntu-20.04"
26+
strategy:
27+
fail-fast: true
28+
matrix:
29+
python-version: ["3.7", "3.8", "3.9"]
30+
steps:
31+
- name: "Check out repository code"
32+
uses: "actions/checkout@v2"
33+
- name: "Install invoke"
34+
run: "pip install -U pip && pip install invoke"
35+
- name: "Tests"
36+
run: "invoke unit"
37+
needs:
38+
- "lint"
39+
integration:
40+
runs-on: "ubuntu-20.04"
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
# Need to check what is needed for the integration step
45+
# python-version: ["3.7", "3.8", "3.9"]
46+
# ansible-release: ["base", "core"]
47+
include:
48+
- python-version: "3.8"
49+
ansible-release: "base" # Ansible 2.10
50+
- python-version: "3.8"
51+
ansible-release: "2.11"
52+
- python-version: "3.8"
53+
ansible-release: "core"
54+
steps:
55+
- name: "Check out repository code"
56+
uses: "actions/checkout@v2"
57+
- name: "Install invoke"
58+
run: "pip install -U pip && pip install invoke"
59+
- name: "Install poetry"
60+
if: "${{ matrix.ansible-release == '2.11' }}"
61+
run: "pip install poetry==1.4.2"
62+
- name: "Remove ansible-base"
63+
if: "${{ matrix.ansible-release == '2.11' }}"
64+
run: "poetry remove ansible-base"
65+
- name: "Add ansible-core"
66+
if: "${{ matrix.ansible-release == '2.11' }}"
67+
run: "poetry add ansible-core@~2.11"
68+
- name: "Install poetry"
69+
if: "${{ matrix.ansible-release == '2.9' }}"
70+
run: "pip install poetry==1.4.2"
71+
- name: "Remove ansible-base"
72+
if: "${{ matrix.ansible-release == '2.9' }}"
73+
run: "poetry remove ansible-base"
74+
- name: "Add Ansible 2.9"
75+
if: "${{ matrix.ansible-release == '2.9' }}"
76+
run: "poetry add ansible@~2.9"
77+
- name: "Install poetry"
78+
if: "${{ matrix.ansible-release == '2.12' }}"
79+
run: "pip install poetry==1.4.2"
80+
- name: "Remove ansible-base"
81+
if: "${{ matrix.ansible-release == '2.12' }}"
82+
run: "poetry remove ansible-base"
83+
- name: "Add Ansible 2.12"
84+
if: "${{ matrix.ansible-release == '2.12' }}"
85+
run: "poetry add ansible-core@~2.12 --python ^${{ matrix.python-version }}"
86+
- name: "Start containers"
87+
run: "invoke start"
88+
- name: "Tests"
89+
run: "invoke integration"
90+
needs:
91+
- "test"
92+
publish_github:
93+
name: "Publish to GitHub"
94+
runs-on: "ubuntu-20.04"
95+
if: "startsWith(github.ref, 'refs/tags/v')"
96+
steps:
97+
- name: "Check out repository code"
98+
uses: "actions/checkout@v2"
99+
- name: "Set up Python"
100+
uses: "actions/setup-python@v2"
101+
with:
102+
python-version: "3.9"
103+
- name: "Install Python Packages"
104+
run: "pip install ansible-core"
105+
- name: "Build the collection"
106+
run: "ansible-galaxy collection build --output-path build"
107+
- name: "Upload binaries to release"
108+
uses: "svenstaro/upload-release-action@v2"
109+
with:
110+
repo_token: "${{ secrets.NTC_GITHUB_TOKEN }}"
111+
file: "build/*"
112+
tag: "${{ github.ref }}"
113+
overwrite: true
114+
file_glob: true
115+
needs:
116+
- "integration"
117+
publish_galaxy:
118+
name: "Publish to Ansible Galaxy"
119+
runs-on: "ubuntu-20.04"
120+
if: "startsWith(github.ref, 'refs/tags/v')"
121+
steps:
122+
- name: "Check out repository code"
123+
uses: "actions/checkout@v2"
124+
- name: "Set up Python"
125+
uses: "actions/setup-python@v2"
126+
with:
127+
python-version: "3.9"
128+
- name: "Install Python Packages"
129+
run: "pip install ansible-core"
130+
- name: "Build the collection"
131+
run: "ansible-galaxy collection build --output-path build"
132+
- name: "Publish the collection"
133+
run: "ansible-galaxy collection publish build/* --api-key=${{ secrets.GALAXY_API_TOKEN }}"
134+
needs:
135+
- "integration"

0 commit comments

Comments
 (0)