[DRAFT] add CI tool for docker health check and initial ci workflow #17
Workflow file for this run
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: Test App Install | |
on: | |
pull_request: {} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Environment Information | |
run: | | |
echo "====== Docker Info ======" | |
docker info | |
echo "=========================" | |
echo "== Docker Compose Info ==" | |
docker compose version | |
echo "=========================" | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
pip install -r requirements.txt | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
- name: Install Go Dependencies | |
run: go mod download | |
- name: Render template | |
shell: bash | |
run: | | |
mkdir -p ./docker-test | |
chmod 777 ./docker-test | |
./main.py > docker-compose.yaml | |
- name: Generate random project name | |
shell: bash | |
run: | | |
echo "PROJECT_NAME=$(openssl rand -hex 12)" >> $GITHUB_ENV | |
- name: Up containers | |
shell: bash | |
run: | | |
docker compose -p $PROJECT_NAME -f docker-compose.yaml up -d | |
- name: Wait containers | |
shell: bash | |
run: | | |
go run check_health.go --project $PROJECT_NAME --files docker-compose.yaml |