-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding bats test suite for integration testing
- Loading branch information
1 parent
4f00bae
commit c76f2d1
Showing
10 changed files
with
300 additions
and
83 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
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 @@ | ||
#!/bin/bash | ||
|
||
[ -d tests/bats/bats-helpers ] && rm -rf tests/bats/bats-helpers | ||
|
||
mkdir -p tests/bats-helpers | ||
|
||
git clone --depth 1 https://github.com/bats-core/bats-support.git tests/bats/bats-helpers/bats-support || true | ||
git clone --depth 1 https://github.com/bats-core/bats-assert.git tests/bats/bats-helpers/bats-assert || true | ||
git clone --depth 1 https://github.com/bats-core/bats-file.git tests/bats/bats-helpers/bats-file || true |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
|
||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout (GitHub) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and run Dev Container task | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
runCmd: | | ||
black --check custom_components/ |
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,38 @@ | ||
|
||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout (GitHub) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and run Dev Container task | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
runCmd: | | ||
python -m pytest -p no:homeassistant tests/pytest/test_databases.py | ||
bats: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout (GitHub) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build and run Dev Container task | ||
uses: devcontainers/ci@v0.3 | ||
with: | ||
runCmd: | | ||
bats tests/bats |
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,11 @@ | ||
# https://www.home-assistant.io/integrations/default_config/ | ||
default_config: | ||
|
||
ltss: | ||
db_url: postgresql://postgres@localhost:5432 | ||
|
||
# https://www.home-assistant.io/integrations/logger/ | ||
logger: | ||
default: info | ||
logs: | ||
custom_components.ltss: debug |
Oops, something went wrong.