Skip to content

Commit

Permalink
append echo in seperate text file
Browse files Browse the repository at this point in the history
  • Loading branch information
Reeya123 committed Jul 12, 2024
1 parent 52f5bf2 commit bc2f2f0
Showing 1 changed file with 25 additions and 35 deletions.
60 changes: 25 additions & 35 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,30 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Debugging Step
- name: Create secrets file
run: |
ls -R server # List all files and directories recursively
cat server/requirements.txt # Print the contents of the requirements file
printenv
echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> .env
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_ID=${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}" >> .env
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET=${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET }}" >> .env
echo "DJANGO_ORCID_OAUTH2_CLIENT_URL=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_URL }}" >> .env
echo "DJANGO_ORCID_OAUTH2_CLIENT_ID=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_ID }}" >> .env
echo "DJANGO_ORCID_OAUTH2_CLIENT_SECRET=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_SECRET }}" >> .env
echo "DJANGO_ORCID_OAUTH2_URL=${{ secrets.DJANGO_ORCID_OAUTH2_URL }}" >> .env
echo "SERVER_VERSION=${{ secrets.SERVER_VERSION }}" >> .env
echo "SERVER_URL=${{ secrets.SERVER_URL }}" >> .env
echo "DATABASE=${{ secrets.DATABASE }}" >> .env
echo "EMAIL_BACKEND=${{ secrets.EMAIL_BACKEND }}" >> .env
- name: Debug Secrets
run: |
cat .env
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r server/requirements.txt
- name: Debug Secrets
run: |
echo "SECRET_KEY is set: ${{ secrets.SECRET_KEY }}" | grep -o "SECRET_KEY is set"
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_ID is set: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}" | grep -o "DJANGO_GOOGLE_OAUTH2_CLIENT_ID is set"
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET is set: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET }}" | grep -o "DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET is set"
echo "DJANGO_ORCID_OAUTH2_CLIENT_URL is set: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_URL }}" | grep -o "DJANGO_ORCID_OAUTH2_CLIENT_URL is set"
echo "DJANGO_ORCID_OAUTH2_CLIENT_ID is set: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_ID }}" | grep -o "DJANGO_ORCID_OAUTH2_CLIENT_ID is set"
echo "DJANGO_ORCID_OAUTH2_CLIENT_SECRET is set: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_SECRET }}" | grep -o "DJANGO_ORCID_OAUTH2_CLIENT_SECRET is set"
echo "DJANGO_ORCID_OAUTH2_URL is set: ${{ secrets.DJANGO_ORCID_OAUTH2_URL }}" | grep -o "DJANGO_ORCID_OAUTH2_URL is set"
echo "SERVER_VERSION is set: ${{ secrets.SERVER_VERSION }}" | grep -o "SERVER_VERSION is set"
echo "SERVER_URL is set: ${{ secrets.SERVER_URL }}" | grep -o "SERVER_URL is set"
echo "DATABASE is set: ${{ secrets.DATABASE }}" | grep -o "DATABASE is set"
echo "EMAIL_BACKEND is set: ${{ secrets.EMAIL_BACKEND }}" | grep -o "EMAIL_BACKEND is set"
- name: Run Tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DJANGO_GOOGLE_OAUTH2_CLIENT_ID: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}
Expand All @@ -58,22 +57,13 @@ jobs:
SERVER_URL: ${{ secrets.SERVER_URL }}
DATABASE: ${{ secrets.DATABASE }}
EMAIL_BACKEND: ${{ secrets.EMAIL_BACKEND }}


- name: Run Tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DJANGO_GOOGLE_OAUTH2_CLIENT_ID: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}
DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET: ${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET }}
DJANGO_ORCID_OAUTH2_CLIENT_URL: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_URL }}
DJANGO_ORCID_OAUTH2_CLIENT_ID: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_ID }}
DJANGO_ORCID_OAUTH2_CLIENT_SECRET: ${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_SECRET }}
DJANGO_ORCID_OAUTH2_URL: ${{ secrets.DJANGO_ORCID_OAUTH2_URL }}
SERVER_VERSION: ${{ secrets.SERVER_VERSION }}
SERVER_URL: ${{ secrets.SERVER_URL }}
DATABASE: ${{ secrets.DATABASE }}
EMAIL_BACKEND: ${{ secrets.EMAIL_BACKEND }}

run: |
cd server # Change to the subdirectory
cp ../.env . # Copy the .env file to the server directory
python3.9 manage.py test
- name: Clean up
run: |
rm .env

0 comments on commit bc2f2f0

Please sign in to comment.