-
Notifications
You must be signed in to change notification settings - Fork 66
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
1 changed file
with
13 additions
and
18 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 |
---|---|---|
|
@@ -34,31 +34,25 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mysql:8.0 | ||
env: | ||
# The MySQL docker container requires these environment variables to be set | ||
# so we can create and migrate the test database. | ||
# See: https://hub.docker.com/_/mysql | ||
MYSQL_DATABASE: bk-user | ||
MYSQL_ROOT_PASSWORD: mysql_root_pass | ||
ports: | ||
# Opens port 3306 on service container and host | ||
# https://docs.github.com/en/actions/using-containerized-services/about-service-containers | ||
- 3306:3306 | ||
# Before continuing, verify the mysql container is reachable from the ubuntu host | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Set up Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: "1.5.1" | ||
- name: Start MySQL Container | ||
uses: samin/[email protected] | ||
with: | ||
host port: 30036 | ||
mysql version: "8.0" | ||
mysql database: bk-user | ||
mysql root password: root | ||
mysql user: root | ||
mysql password: root | ||
- name: Start Redis Container | ||
uses: supercharge/[email protected] | ||
with: | ||
|
@@ -73,6 +67,7 @@ jobs: | |
export BK_APP_SECRET="" | ||
export BK_USER_URL="" | ||
export BK_COMPONENT_API_URL="" | ||
export MYSQL_PASSWORD=mysql_root_pass | ||
export MYSQL_PASSWORD=root | ||
export MYSQL_HOST="127.0.0.1" | ||
export DJANGO_SETTINGS_MODULE=bkuser.settings | ||
poetry run pytest ./tests |