-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.37 KB
/
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Run Server and Client Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Decrypt .env file
run: echo "${{ secrets.ENV_FILE }}" > server/.env
env:
ENV_FILE: ${{ secrets.ENV_FILE }}
- name: Decrypt service_account_key.json file
run: |
echo "${{ secrets.SERVICE_ACCOUNT_KEY }}" | base64 -d > server/credentials/service_account_key.json
env:
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- name: Install Python Dependencies
run: pip install -r server/requirements.txt
- name: Install Node.js and NPM
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Client Dependencies
run: cd client && npm install && cd ..
- name: Run Server and Client Tests
run: |
coverage run --source=server -m pytest server/tests
cd client && npm run test && cd ..
- name: Send Coverage to Coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}