generated from ApplebaumIan/tu-cis-4398-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (55 loc) · 1.98 KB
/
testing_integration.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
name: Testing Integration
on:
pull_request:
branches: [ "main" ]
paths:
- 'frontend/**'
- 'testing/cypress/**'
- '.github/workflows/testing_integration.yml'
jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create .env containing secrets.
env:
API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REF_URL: ${{ secrets.REACT_APP_FIREBASE_REF_URL }}
EMAIL: ${{ secrets.TEST_USER_EMAIL }}
PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}
run: |
cat <<EOF > .env
REACT_APP_FIREBASE_API_KEY="$API_KEY"
REACT_APP_FIREBASE_AUTH_DOMAIN="$AUTH_DOMAIN"
REACT_APP_FIREBASE_PROJECT_ID="$PROJECT_ID"
REACT_APP_FIREBASE_REF_URL="$REF_URL"
TEST_USER_EMAIL="$EMAIL"
TEST_USER_PASSWORD="$PASSWORD"
EOF
working-directory: ./testing
- name: Create .json containing secrets.
env:
KEY: ${{ secrets.TUTRAFFIC_FIREBASE_KEY_64 }}
run: echo $KEY | base64 -d > tutraffic-firebase-key.json
working-directory: ./testing
- name: Install python dependencies.
run: python -m pip install -r testing/cypress/python/requirements.txt
- name: Run Cypress tests.
uses: cypress-io/github-action@v5
with:
working-directory: ./testing
command: npx cypress run --browser chrome --config video=false