-
Notifications
You must be signed in to change notification settings - Fork 32
63 lines (53 loc) · 1.81 KB
/
auth-ci.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
name: Auth Integration workflow
on: pull_request_target
jobs:
authorize:
environment:
'testing-external-code'
runs-on: ubuntu-latest
steps:
- run: true
setup:
needs: authorize
name: auth-integration-test
runs-on: ubuntu-latest
env:
MOCK_USERS_PASSWORD: ${{ secrets.MEDPERF_MOCK_USERS_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Setup Chrome
run: |
sudo apt-get install -y wget
wget -O chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_126.0.6478.126-1_amd64.deb
sudo apt update && sudo apt install ./chrome.deb -y --allow-downgrades
rm chrome.deb
- name: Install dependencies
working-directory: .
run: |
python -m pip install --upgrade pip
pip install -e cli/
pip install -r cli/test-requirements.txt
pip install -r server/requirements.txt
pip install -r server/test-requirements.txt
- name: Set server environment vars
working-directory: ./server
run: cp .env.local.online-auth .env
- name: Run postgresql server in background
working-directory: ./server
run: sh run_dev_postgresql.sh && sleep 6
- name: Run django server in background with generated certs
working-directory: ./server
run: sh setup-dev-server.sh & sleep 6
- name: Run server integration tests
working-directory: ./server
run: python seed.py --cert cert.crt --auth online
- name: Run client integration tests
working-directory: .
run: sh cli/auth_tests.sh -f