-
Notifications
You must be signed in to change notification settings - Fork 21
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 #19 from nyu-devops/updates-sp24
Updates for Spring 2024 Semester
- Loading branch information
Showing
32 changed files
with
1,500 additions
and
344 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
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 was deleted.
Oops, something went wrong.
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 @@ | ||
#!/bin/bash | ||
echo "Setting up Docker lab environment..." | ||
echo "Setting up Kubernetes lab environment..." | ||
docker pull python:3.11-slim | ||
docker run -d --name redis --restart always -p 6379:6379 -v redis:/data redis:6-alpine | ||
echo Setting up registry.local... | ||
sudo bash -c "echo '127.0.0.1 cluster-registry' >> /etc/hosts" | ||
echo "Setup complete" | ||
echo "Setup complete" |
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 |
---|---|---|
|
@@ -4,17 +4,17 @@ on: | |
branches: | ||
- master | ||
paths-ignore: | ||
- 'README.md' | ||
- '.vscode/**' | ||
- '.devcontainers/**' | ||
- 'README.md' | ||
- '.vscode/**' | ||
- '.devcontainers/**' | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'README.md' | ||
- '.vscode/**' | ||
- '.devcontainers/**' | ||
- 'README.md' | ||
- '.vscode/**' | ||
- '.devcontainers/**' | ||
|
||
jobs: | ||
build: | ||
|
@@ -24,35 +24,32 @@ jobs: | |
# Required services | ||
services: | ||
redis: | ||
image: redis | ||
image: redis:6-alpine | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Python dependencies | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
pip install -r requirements.txt | ||
python -m pip install poetry | ||
poetry config virtualenvs.create false | ||
poetry install | ||
- name: Linting | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 service tests --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# check for omplexity. The GitHub editor is 127 chars wide | ||
flake8 service tests --count --max-complexity=10 --max-line-length=127 --statistics | ||
# Run pylint on the service and tests folders only | ||
pylint service tests --max-line-length=127 | ||
- name: Run unit tests with green | ||
run: green | ||
- name: Run unit tests with PyTest | ||
run: pytest | ||
env: | ||
DATABASE_URI: "redis://redis:6379/0" | ||
RETRY_COUNT: 2 | ||
|
||
- name: Upload code coverage | ||
uses: codecov/[email protected] |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
web: gunicorn --bind 0.0.0.0:$PORT --log-level=info service:app | ||
web: gunicorn --bind 0.0.0.0:$PORT --log-level=info wsgi:app |
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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.