-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (70 loc) · 3.88 KB
/
django.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Django CI
on:
push:
branches:
- "**"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
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: Debugging Step
run: |
ls -R server # List all files and directories recursively
cat server/requirements.txt # Print the contents of the requirements file
print 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"
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 }}
- 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
python3.9 manage.py test