UUFSolver #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |