-
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.
Add unit tests, linting and tests CI/CD (#6)
* add unit tests and linting * add tests ci/cd
- Loading branch information
Showing
12 changed files
with
506 additions
and
124 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,9 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
uses: canonical/operator-workflows/.github/workflows/test.yaml@cea2ac306b4f4c1475d73b1a4c766d62e5b1c8a9 | ||
secrets: inherit |
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,37 @@ | ||
header: | ||
license: | ||
spdx-id: Apache-2.0 | ||
copyright-owner: Canonical Ltd. | ||
copyright-year: 2024 | ||
content: | | ||
Copyright [year] [owner] | ||
See LICENSE file for licensing details. | ||
paths: | ||
- '**' | ||
paths-ignore: | ||
- '.github/**' | ||
- '**/.gitkeep' | ||
- '**/*.cfg' | ||
- '**/*.conf' | ||
- '**/*.j2' | ||
- '**/*.json' | ||
- '**/*.md' | ||
- '**/*.rule' | ||
- '**/*.tmpl' | ||
- '**/*.txt' | ||
- '**/*.jinja' | ||
- '.codespellignore' | ||
- '.dockerignore' | ||
- '.flake8' | ||
- '.jujuignore' | ||
- '.gitignore' | ||
- '.licenserc.yaml' | ||
- '.trivyignore' | ||
- '.woke.yaml' | ||
- '.woke.yml' | ||
- 'CODEOWNERS' | ||
- 'icon.svg' | ||
- 'LICENSE' | ||
- 'trivy.yaml' | ||
- 'lib/**' | ||
comment: on-failure |
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,7 @@ | ||
ignore_files: | ||
# Ignore ingress charm library as it uses non compliant terminology: | ||
# whitelist. | ||
- lib/charms/nginx_ingress_integrator/v0/nginx_route.py | ||
rules: | ||
# Ignore "master" - the database relation event received from the library. | ||
- name: master |
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,9 @@ | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
|
||
"""Unit tests config.""" | ||
|
||
import ops.testing | ||
|
||
ops.testing.SIMULATE_CAN_CONNECT = True |
Oops, something went wrong.