-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.42 KB
/
check.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: Run Tests on Ubuntu 22.04
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11.6"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Set PYTHONPATH
run: export PYTHONPATH="${PYTHONPATH}:${{ github.workspace }}/functions/funcs"
- name: Start Uvicorn server
run: uvicorn algo:app &
- name: Run end-to-end tests
run: python tests/e2e/e2e_tests.py
- name: Run integration tests 4
run: python -m tests.integration.assignment4
- name: Run integration tests 5
run: python -m tests.integration.assignment5
- name: Run integration tests 7
run: python -m tests.integration.assignment7
- name: Deploy to AWS EC2
run: |
echo "${{ secrets.AWS_KEY }}" > aws.pem
chmod 600 aws.pem
ssh -i aws.pem -o StrictHostKeyChecking=no [email protected] << EOF
cd server
git pull origin master
cd KSE_OPI
screen -r 9500.pts-0.ip-172-31-39-83 -X stuff "^C"
python3 -m uvicorn algo:app --host 0.0.0.0 --port 8081
EOF
env:
SSH_PRIVATE_KEY: ${{ secrets.AWS_KEY }}
shell: bash