-
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 #112 from NeverScapeAlone/develop
Development Test Environment
- Loading branch information
Showing
11 changed files
with
110 additions
and
103 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/pull_workflow.yml → .github/workflows/api_pull.yml
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,7 +1,7 @@ | ||
name: Pull workflow | ||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
branches: [main] | ||
|
||
jobs: | ||
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
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,26 @@ | ||
name: Development Pull workflow | ||
on: | ||
pull_request: | ||
branches: [develop] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 2 | ||
steps: | ||
- name: Test Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.X" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Pytest | ||
run: | | ||
pytest tests |
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,53 @@ | ||
name: Development Push workflow | ||
on: | ||
push: | ||
branches: [develop] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 2 | ||
steps: | ||
- name: Test Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.X" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Pytest | ||
run: | | ||
pytest tests | ||
checkout: | ||
needs: pytest | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set Up ENV | ||
run: | | ||
echo "${{ secrets.DEV_SQL_URI }}" > .env | ||
echo "${{ secrets.DISCORD_ROUTE_TOKEN}}" >> .env | ||
echo "${{ secrets.REDIS_PASSWORD}}" >> .env | ||
echo "${{ secrets.DEV_REDIS_DATABASE}}" >> .env | ||
echo "${{ secrets.REDIS_PORT}}" >> .env | ||
echo "${{ secrets.DEV_DISCORD_WEBHOOK}}" >> .env | ||
echo "${{ secrets.DEV_DISCORD_ROUTE_TOKEN}}" >> .env | ||
echo "${{ secrets.RATE_LIMIT_MINUTE}}" >> .env | ||
echo "${{ secrets.RATE_LIMIT_HOUR}}" >> .env | ||
echo "${{ secrets.MATCH_VERSION}}" >> .env | ||
echo "${{ secrets.DEVELOPER_MODE}}" >> .env | ||
deploy: | ||
runs-on: self-hosted | ||
needs: checkout | ||
steps: | ||
- name: Docker | ||
run: | | ||
sudo docker-compose up --build -d dev |
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
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,9 @@ | ||
FROM python:3.10-slim | ||
|
||
WORKDIR /code | ||
COPY . /code/ | ||
|
||
EXPOSE 5501 | ||
|
||
RUN pip install -r requirements.txt | ||
CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "5501"] |