-
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.
Merge pull request #12 from shun198/release/1.0.0
Release/1.0.0
- Loading branch information
Showing
13 changed files
with
315 additions
and
328 deletions.
There are no files selected for viewing
Empty file.
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,14 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v4 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
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,45 @@ | ||
name: Test Service Container | ||
on: | ||
pull_request: | ||
branches-ignore: | ||
- "release/**" | ||
jobs: | ||
test: | ||
name: Run Test Code | ||
runs-on: ubuntu-20.04 | ||
services: | ||
mysql: | ||
image: mysql:8.0.31 | ||
ports: | ||
- 3306:3306 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: django-db | ||
MYSQL_USER: django | ||
MYSQL_PASSWORD: django | ||
options: >- | ||
--health-cmd "mysqladmin ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- run: poetry install | ||
- name: Show databases for root user | ||
run: mysql --protocol=tcp -h localhost -P 3306 -u root -proot -e "select user,host FROM mysql.user" | ||
- name: Give privileges to runner | ||
run: | | ||
GRANT ALL PRIVILEGES ON *.* TO 'runner'@'%'; | ||
FLUSH PRIVILEGES; | ||
- name: Run migration | ||
run: | | ||
poetry run python manage.py makemigrations | ||
poetry run python manage.py migrate | ||
- name: Run tests | ||
run: poetry run pytest |
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
Empty file.
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 @@ | ||
from django.db import DataError, IntegrityError | ||
from django.test import TransactionTestCase | ||
|
||
from application.models import User | ||
|
||
|
||
class TestUser(TransactionTestCase): | ||
fixtures = ["fixture.json"] | ||
model = User |
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,3 +1,3 @@ | ||
-- MYSQL_USERに権限を付与 | ||
GRANT ALL PRIVILEGES ON *.* TO 'django'@'%'; | ||
FLUSH PRIVILEGES; | ||
FLUSH PRIVILEGES; |
Oops, something went wrong.