Skip to content

Commit

Permalink
ci(testinglogin): added login key from secrets in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Sep 3, 2024
1 parent 59c6657 commit 7f90d87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/backend_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ jobs:
with:
python-version: 3.8

- name: Get my current working dir
run: pwd

- name: Test env vars for python
env:
TESTING_TOKEN: ${{ secrets.TESTING_TOKEN }}
run: python -c "import os; print(os.environ['TESTING_TOKEN'])"

- name: Clone Ramp
run: git clone https://github.com/kshitijrajsharma/ramp-code-fAIr.git ramp-code

Expand Down Expand Up @@ -92,7 +84,6 @@ jobs:
- name: Create env
run: |
cd backend/
mv sample_env .env
export DATABASE_URL=postgis://admin:password@localhost:5432/ai
export RAMP_HOME="/home/runner/work/fAIr/fAIr"
export TRAINING_WORKSPACE="/home/runner/work/fAIr/fAIr/backend/training"
Expand Down Expand Up @@ -134,7 +125,7 @@ jobs:
TESTING_TOKEN: ${{ secrets.TESTING_TOKEN }}
OSM_CLIENT_ID: ${{ secrets.OSM_CLIENT_ID }}
OSM_CLIENT_SECRET: ${{ secrets.OSM_CLIENT_SECRET }}
OSM_SECRET_KEY: ""
OSM_SECRET_KEY: ${{ secrets.OSM_SECRET_KEY }}

run : |
cd backend/
Expand Down
3 changes: 2 additions & 1 deletion backend/login/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def get(self, request, format=None): # pragma: no cover
json: access_token
"""
# Generating token through osm_auth library method
token = osm_auth.callback(request.build_absolute_uri())
uri=request.build_absolute_uri()
token = osm_auth.callback(uri)
return JsonResponse(json.loads(token))


Expand Down

0 comments on commit 7f90d87

Please sign in to comment.