Skip to content

Commit e6b8975

Browse files
committed
Initial commit
0 parents  commit e6b8975

39 files changed

+4509
-0
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
- package-ecosystem: 'github-actions'
6+
directory: '/'
7+
schedule:
8+
interval: 'daily'
9+
- package-ecosystem: pip
10+
directory: '/'
11+
schedule:
12+
interval: daily
13+
versioning-strategy: lockfile-only
14+
allow:
15+
- dependency-type: 'all'

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Publish
14+
env:
15+
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
16+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
17+
run: |
18+
keyring --disable
19+
pip install poetry
20+
poetry build
21+
poetry publish

.github/workflows/test.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Tests
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Python Setup
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Pre-commit Checks
24+
uses: pre-commit/[email protected]
25+
26+
# - name: Type Checks
27+
# run: |
28+
# pip install poetry
29+
# poetry install
30+
# poetry run mypy nac_collector
31+
32+
test:
33+
name: Tests
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
strategy:
37+
matrix:
38+
python:
39+
- "3.8"
40+
- "3.9"
41+
- "3.10"
42+
- "3.11"
43+
- "3.12"
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Python Setup
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python }}
52+
53+
- name: Test
54+
run: |
55+
pip install poetry
56+
poetry install
57+
poetry run pytest
58+
59+
notification:
60+
name: Notification
61+
if: always() && github.event_name != 'pull_request'
62+
needs: [lint, test]
63+
runs-on: ubuntu-latest
64+
timeout-minutes: 5
65+
steps:
66+
- name: Check Job Success
67+
run: |
68+
if [ ${{ needs.lint.result }} == 'success' ] && [ ${{ needs.test.result }} == 'success' ]; then
69+
echo "All jobs succeeded"
70+
echo "jobSuccess=success" >> $GITHUB_ENV
71+
else
72+
echo "Not all jobs succeeded"
73+
echo "jobSuccess=fail" >> $GITHUB_ENV
74+
fi
75+
id: print_status
76+
77+
- name: Webex Notification
78+
if: always()
79+
uses: qsnyder/action-wxt@master
80+
env:
81+
TOKEN: ${{ secrets.WEBEX_TOKEN }}
82+
ROOMID: ${{ secrets.WEBEX_ROOM_ID }}
83+
MESSAGE: |
84+
[**[${{ env.jobSuccess }}] ${{ github.repository }} #${{ github.run_number }}**](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
85+
* Commit: [${{ github.event.head_commit.message }}](${{ github.event.head_commit.url }})[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
86+
* Author: ${{ github.event.sender.login }}
87+
* Branch: ${{ github.ref }} ${{ github.head_ref }}
88+
* Event: ${{ github.event_name }}

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*.json
2+
#/endpoints*.yaml
3+
!examples/*.json
4+
!examples/endpoints*.yaml
5+
tmp/
6+
.envrc
7+
.DS_Store
8+
.pylintrc
9+
.vscode
10+
terraform*
11+
12+
# pyenv
13+
.python-version
14+
__pycache__/
15+
16+
.idea

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.5.6
4+
hooks:
5+
- id: ruff
6+
- id: ruff-format

0 commit comments

Comments
 (0)