Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add auth app #2

Merged
merged 13 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- './README.md'
- './web/README.md'
- name: List all changed files
run:
echo steps.filter.outputs
run: echo steps.filter.outputs

build-web:
name: Build Web
runs-on: ubuntu-latest
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -96,26 +96,38 @@ jobs:
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
python-version: "3.12"

- name: Cache PipEnv
id: cache-pipenv
uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv

- name: Install pipenv
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pipenv wheel

- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev

- name: Run tests
run: |
pipenv run python manage.py test
pipenv run coverage run --source='.' ./manage.py test
env:
SECRET_KEY: "NSNLNDNLN"

- name: Generate coverage report
run: |
pipenv run coverage xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
SECRET_KEY: "NSNLNDNLN"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/Docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
branches:
- main
release:
types: [ published ]
types: [published]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -50,8 +50,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Setup gcloud Auth
id: auth
uses: google-github-actions/auth@v2
id: account
uses: google-github-actions/account@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

Expand All @@ -62,7 +62,7 @@ jobs:

# - name: Access gcloud CLI
# run: |
# gcloud auth configure-docker
# gcloud account configure-docker

- name: SSH into VM
id: compute-ssh
Expand All @@ -74,11 +74,11 @@ jobs:
command: |
cat /home/jerryhanksokafor/.env
sudo docker ps
# sudo docker run --name url-shortener --env-file /home/jerryhanksokafor/.env -p 8000:8000 jerryokafor/url-shortener
sudo docker run --name url-shortener --env-file /home/jerryhanksokafor/.env -p 8000:8000 jerryokafor/url-shortener

# Example of using the output
- name: Show result of SSH int Vm
id: test
run: |-
echo '${{ steps.compute-ssh.outputs.stdout }}'
echo '${{ steps.compute-ssh.outputs.stderr }}'
echo '${{ steps.compute-ssh.outputs.stderr }}'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ downloads/
eggs/
.eggs/
lib/
!web/src/app/lib
lib64/
parts/
sdist/
Expand Down
17 changes: 17 additions & 0 deletions .idea/dataSources.local.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading