-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
18 changed files
with
522 additions
and
40 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,52 @@ | ||
name: Pytest | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python # Set Python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pipx | ||
python -m pipx install poetry | ||
poetry install | ||
- name: Test with pytest | ||
run: export PYTHONUNBUFFERED=1 && poetry run pytest --cov --cov-report=xml --cov-report=term --cov-report=html --junit-xml=report.xml | ||
- name: Genbadge coverage | ||
run: poetry run genbadge coverage -i coverage.xml | ||
- name: Genbadge tests | ||
run: poetry run genbadge tests -i report.xml | ||
- name: move artifacts to htmlcov | ||
run: mv report.xml coverage.xml coverage-badge.svg tests-badge.svg ./htmlcov/ | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Upload coverage report | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './htmlcov' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,28 @@ | ||
name: Pytest | ||
|
||
on: [push] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python # Set Python version | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pipx | ||
python -m pipx install poetry | ||
poetry install | ||
- name: Test with pytest | ||
run: export PYTHONUNBUFFERED=1 && poetry run pytest --cov |
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ config.yaml | |
*__pycache__* | ||
*.dat | ||
dist/ | ||
htmlcov | ||
.coverage | ||
coverage.xml | ||
report.xml |
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
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
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
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
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
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
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
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 @@ | ||
CONFIG = "./config.sample.yaml" |
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,54 @@ | ||
test_pod_created: | ||
type: Normal | ||
involved_object: | ||
kind: Pod | ||
name: test-pod | ||
namespace: default | ||
reason: Scheduled | ||
message: This is a test event | ||
log_message: "[default_group/discord,default_group/gotify,default_group/mattermost] [✅] Pod test-pod Scheduled." | ||
|
||
test_pod_created_excluded: | ||
type: Normal | ||
involved_object: | ||
kind: Job | ||
name: test-job | ||
namespace: default | ||
reason: Created | ||
message: This is a test event | ||
log_message: "[Excluded] [✅] Job test-job Created." | ||
|
||
test_deleted_pod: | ||
type: Normal | ||
involved_object: | ||
kind: Pod | ||
name: unknown | ||
namespace: default | ||
reason: Killing | ||
message: This is a test event | ||
log_message: "[Excluded] [✅] Pod unknown Killing." | ||
|
||
test_pod_oomkilled: | ||
log_message: "[default_group/discord,default_group/gotify,default_group/mattermost] [💥] Pod test-pod OOMKilled." | ||
|
||
test_pod_crashed: | ||
log_message: "[default_group/discord,default_group/gotify,default_group/mattermost] [💥] Pod website Error." | ||
|
||
test_unhealthy_pod: | ||
type: Warning | ||
involved_object: | ||
kind: Pod | ||
name: cloud | ||
namespace: default | ||
reason: Unhealthy | ||
message: Liveness Probe failed. | ||
log_message: "[Excluded] [⚠️] Pod cloud Unhealthy." | ||
|
||
test_unknown_event: | ||
type: Unknown | ||
involved_object: | ||
kind: Unknown | ||
name: Unknown | ||
reason: Unknown | ||
message: Unknown | ||
log_message: "[default_group/discord,default_group/gotify,default_group/mattermost] [🔔] Unknown Unknown Unknown." |
Oops, something went wrong.