File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deployment Autotests
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - cicd
8+ schedule :
9+ - cron : " 0 */12 * * *"
10+
11+ jobs :
12+ deployment-tests :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v3
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : " 3.10"
22+
23+ - name : Install Docker
24+ uses : docker/setup-buildx-action@v2
25+
26+ - name : Install uv
27+ run : curl -LsSf https://astral.sh/uv/install.sh | sh
28+
29+ - name : Add uv to PATH
30+ run : echo "$HOME/.cargo/bin" >> $GITHUB_PATH
31+
32+ - name : Build and install SDK
33+ run : |
34+ python -m preswald.build all
35+ pip install ./dist/*.whl
36+
37+ - name : Create .env file
38+ run : |
39+ mkdir -p autotest/deployments/structured
40+ echo "GITHUB_USERNAME=${{ secrets.DEPLOYMENT_AUTOTEST_GITHUB_USERNAME }}" > autotest/deployments/structured/.env.structured
41+ echo "STRUCTURED_CLOUD_API_KEY=${{ secrets.DEPLOYMENT_AUTOTEST_STRUCTURED_CLOUD_API_KEY }}" >> autotest/deployments/structured/.env.structured
42+
43+ - name : Run deployment tests
44+ run : |
45+ chmod +x autotest/deployments/structured/test.sh
46+ ./autotest/deployments/structured/test.sh
47+
48+ - name : Check test results
49+ run : |
50+ if [ $? -eq 0 ]; then
51+ echo "Deployment tests passed successfully!"
52+ exit 0
53+ else
54+ echo "Deployment tests failed!"
55+ exit 1
56+ fi
You can’t perform that action at this time.
0 commit comments