Deployment Autotests #99
This file contains hidden or 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: Deployment Autotests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
deployment-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Install uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Add uv to PATH | |
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: Build and install SDK | |
run: | | |
uv venv | |
source .venv/bin/activate | |
uv pip install -U pytest | |
uv pip install -e . | |
python -m preswald.build frontend | |
uv build | |
pip install ./dist/*.whl | |
- name: Run local target deployment tests | |
run: | | |
source .venv/bin/activate | |
chmod +x autotest/deployments/local/test.sh | |
./autotest/deployments/local/test.sh | |
- name: Check test results | |
run: | | |
if [ $? -eq 0 ]; then | |
echo "Deployment tests passed successfully!" | |
exit 0 | |
else | |
echo "Deployment tests failed!" | |
exit 1 | |
fi |