-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from IMBlues/fix-actions-2
fix: reduce dependencies for unittest in actions
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 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 |
---|---|---|
|
@@ -20,13 +20,17 @@ jobs: | |
DB_DATABASE: bk_user_api_test | ||
DB_USER: root | ||
DB_PASSWORD: root | ||
DB_PORT: 3306 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up MySQL | ||
run: | | ||
sudo /etc/init.d/mysql start | ||
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} | ||
- uses: samin/[email protected] | ||
with: | ||
mysql version: '5.7' | ||
mysql database: ${{ env.DB_DATABASE }} | ||
mysql root password: ${{ env.DB_PASSWORD }} | ||
mysql user: ${{ env.DB_USER }} | ||
mysql password: ${{ env.DB_PASSWORD }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -38,7 +42,7 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
cd src/api/ | ||
poetry config virtualenvs.create false && poetry install | ||
poetry config virtualenvs.create false && bash bin/install_ci_dependencies.sh | ||
- name: Run api unittest | ||
env: | ||
DJANGO_SETTINGS_MODULE: "bkuser_core.config.overlays.unittest" | ||
|
@@ -52,7 +56,7 @@ jobs: | |
DB_USER: ${{ env.DB_USER }} | ||
DB_PASSWORD: ${{ env.DB_PASSWORD }} | ||
DB_HOST: "127.0.0.1" | ||
DB_PORT: "3306" | ||
DB_PORT: ${{ env.DB_PORT }} | ||
run: | | ||
make link | ||
cd src/api | ||
|
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,10 @@ | ||
#!/bin/bash | ||
|
||
poetry export -f requirements.txt --dev --without-hashes -o requirements.txt --no-ansi | ||
|
||
sed -i '/^--extra-index-url*/d' requirements.txt | ||
sed -i '/gevent/d' requirements.txt | ||
sed -i '/greenlet/d' requirements.txt | ||
sed -i '/gunicorn/d' requirements.txt | ||
|
||
pip install -r requirements.txt -i https://pypi.org/simple/ |