forked from MiczFlor/RPi-Jukebox-RFID
-
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
1 parent
6219f71
commit 86b210e
Showing
6 changed files
with
30 additions
and
14 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
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Runner script for flak8 to ensure | ||
# - correct config file | ||
# Runner script to ensure | ||
# - correct venv activation | ||
# - independent from working directory | ||
|
||
# Change working directory to location of script | ||
# Change working directory to project root | ||
SOURCE=${BASH_SOURCE[0]} | ||
SCRIPT_DIR="$(dirname "$SOURCE")" | ||
cd "$SCRIPT_DIR" || { echo "Could not change to top-level project directory"; exit 1; } | ||
PROJECT_ROOT="$SCRIPT_DIR" | ||
cd "$PROJECT_ROOT" || { echo "Could not change directory"; exit 1; } | ||
|
||
source .venv/bin/activate || { echo "ERROR: Failed to activate virtual environment for python"; exit 1; } | ||
|
||
# Run flake8 | ||
flake8 --config .flake8 "$@" |
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Runner script for pytest to ensure | ||
# - correct config file | ||
# Runner script to ensure | ||
# - correct venv activation | ||
# - independent from working directory | ||
|
||
# Change working directory to location of script | ||
# Change working directory to project root | ||
SOURCE=${BASH_SOURCE[0]} | ||
SCRIPT_DIR="$(dirname "$SOURCE")" | ||
cd "$SCRIPT_DIR" || { echo "Could not change to top-level project directory"; exit 1; } | ||
PROJECT_ROOT="$SCRIPT_DIR" | ||
cd "$PROJECT_ROOT" || { echo "Could not change directory"; exit 1; } | ||
|
||
source .venv/bin/activate || { echo "ERROR: Failed to activate virtual environment for python"; exit 1; } | ||
|
||
# Run pytest | ||
pytest -c pytest.ini $@ |