-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move testing outside Docker, simplify Dockerfile (#508)
In this commit, we move testing outside Docker. Because of this, we now only need two stages in our multistage build: - one stage to build Python dependencies - another stage to copy in the dependencies and run the application Other changes: * Move update_baseline to `bin/` directory This is so that all scripts live in one directory. * Add `make` rule for update-secrets Also, alpha sort make rules * Update documentation with new testing procedures * Update .secrets.baseline
- Loading branch information
1 parent
aeb42dc
commit f7bf386
Showing
13 changed files
with
120 additions
and
169 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
POETRY_RUN="poetry run" | ||
|
||
CURRENT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) | ||
BASE_DIR="$(dirname "$CURRENT_DIR")" | ||
|
||
# without this, some tests fail because of off-by-timezone errors. | ||
export TZ=UTC | ||
|
||
$POETRY_RUN coverage run --rcfile "${BASE_DIR}/pyproject.toml" -m pytest | ||
$POETRY_RUN coverage report --rcfile "${BASE_DIR}/pyproject.toml" -m --fail-under 80 | ||
$POETRY_RUN coverage html --rcfile "${BASE_DIR}/pyproject.toml" |
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,14 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
# Tell apt-get we're never going to be able to give manual | ||
# feedback: | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
# Install security updates | ||
apt-get -y upgrade | ||
# Install packages | ||
apt-get -y install --no-install-recommends $@ | ||
# Delete cached files we don't need anymore | ||
apt-get clean | ||
rm -rf /var/lib/apt/lists/* |
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 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
detect-secrets scan . \ | ||
--baseline .secrets.baseline \ | ||
--exclude-files "(poetry.lock$)|(htmlcov/)" |
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 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
Oops, something went wrong.