Skip to content

Test secrets debug #169

Test secrets debug

Test secrets debug #169

Workflow file for this run

name: Django CI
on:
push:
branches:
- "**"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
environment: Testing # Specify the environment here
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Create secrets file
run: |
echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> server/.env
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_ID=${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_ID }}" >> server/.env
echo "DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET=${{ secrets.DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET }}" >> server/.env
echo "DJANGO_ORCID_OAUTH2_CLIENT_URL=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_URL }}" >> server/.env
echo "DJANGO_ORCID_OAUTH2_CLIENT_ID=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_ID }}" >> server/.env
echo "DJANGO_ORCID_OAUTH2_CLIENT_SECRET=${{ secrets.DJANGO_ORCID_OAUTH2_CLIENT_SECRET }}" >> server/.env
echo "DJANGO_ORCID_OAUTH2_URL=${{ secrets.DJANGO_ORCID_OAUTH2_URL }}" >> server/.env
echo "SERVER_VERSION=${{ secrets.SERVER_VERSION }}" >> server/.env
echo "SERVER_URL=${{ secrets.SERVER_URL }}" >> server/.env
echo "DATABASE=${{ secrets.DATABASE }}" >> server/.env
echo "EMAIL_BACKEND=${{ secrets.EMAIL_BACKEND }}" >> server/.env
- name: Debug Secrets
run: |
cat server/.env
- name: Export Environment Variables
run: |
export $(cat server/.env | xargs)
shell: bash
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r server/requirements.txt
- name: Run Tests
run: |
cd server # Change to the subdirectory
python3.9 manage.py test
- name: Clean up
run: |
rm server/.env