-
Notifications
You must be signed in to change notification settings - Fork 2.8k
52 lines (44 loc) · 1.26 KB
/
linux-test-deploy.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
name: Linux Test Deployment
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- name: Install Rust
run: |
if ! command -v rustc &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi
- name: Package environment
run: |
tar -czf venv.tar.gz venv
mv venv.tar.gz $GITHUB_WORKSPACE
- name: Test Deployment
run: |
tar -xzf venv.tar.gz
if [ ! -d "venv/bin" ]; then
echo "Error: venv directory not found after unpacking"
exit 1
fi
export PATH=$PATH:/home/.local/bin:/home/site/wwwroot/venv/bin
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
start.sh # Replace with your actual start command