-
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.
Merge pull request #11 from snuhcs-course/feat/CICD-backend
Feat/CICD backend
- Loading branch information
Showing
4 changed files
with
130 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: SpeechBuddy Backend CD | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: SSH Remote Commands | ||
uses: appleboy/[email protected] | ||
with: | ||
key: ${{ secrets.SSH_KEY }} | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
script: | | ||
sh deploy.sh |
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,39 @@ | ||
name: SpeechBuddy Backend CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
cd backend | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Tests | ||
run: | | ||
cd backend | ||
python manage.py test --no-input | ||
env: | ||
SECRET_KEY: ${{ secrets.SECRET_KEY }} | ||
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }} | ||
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }} |
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,55 @@ | ||
from unittest import TestCase | ||
|
||
|
||
class TestUserSignUpView(TestCase): | ||
def test_post(self): | ||
self.assertEqual(1, 1) | ||
|
||
# class TestSignUpEmailVerifySendView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestPasswordEmailVerifySendView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestSignUpEmailVerifyAcceptView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestPasswordEmailVerifyAcceptView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestUserLoginView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestUserLogoutView(TestCase): | ||
# def test_post(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestUserProfileView(TestCase): | ||
# def test_get(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestPasswordUpdateView(TestCase): | ||
# def test_patch(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestNicknameUpdateView(TestCase): | ||
# def test_patch(self): | ||
# self.fail() | ||
# | ||
# | ||
# class TestUserWithdrawView(TestCase): | ||
# def test_post(self): | ||
# self.fail() |