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 : Test setup script 2.0
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - one-liner-2.0
8+ paths :
9+ - ' docker-compose2.0/**'
10+ - ' .github/workflows/test2.yml'
11+ pull_request :
12+ branches :
13+ - main
14+ paths :
15+ - ' docker-compose2.0/**'
16+ - ' .github/workflows/test2.yml'
17+
18+ jobs :
19+ test :
20+ name : Test setup script 2.0
21+ runs-on : [self-hosted, Linux, X64]
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Login to GitHub container registry
27+ uses : docker/login-action@v2
28+ with :
29+ registry : ghcr.io
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Create working directory
34+ run : mkdir temp
35+
36+ - name : Copy compose file
37+ run : cp docker-compose2.0/docker-compose.setup.yaml temp/docker-compose.yaml
38+
39+ - name : Run setup script
40+ working-directory : temp
41+ run : bash ../docker-compose2.0/setup.sh
42+
43+ - name : Wait for stack to be ready
44+ run : sleep 15s
45+
46+ - name : Test health endpoint
47+ run : curl -f http://localhost:8000/api/v1/health
48+
49+ - name : Stop compose stack
50+ if : always()
51+ working-directory : temp
52+ run : docker compose down -v
53+
54+ - name : Cleanup
55+ if : always()
56+ run : sudo rm -rf temp
You can’t perform that action at this time.
0 commit comments