Skip to content

[DRAFT] add CI tool for docker health check and initial ci workflow #24

[DRAFT] add CI tool for docker health check and initial ci workflow

[DRAFT] add CI tool for docker health check and initial ci workflow #24

Workflow file for this run

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.11"
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.2"
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
shell: bash
run: |
pip install -r requirements.txt
- name: Install Go Dependencies
run: go mod download
# TODO: Find changed files
# TODO: for each app, loop over the ci/ directory and do the below process
- name: Render template
shell: bash
run: |
./main.py > docker-compose.yaml
- name: Preview template
shell: bash
run: |
# Print the parsed, by compose, template
# (as it will also remove empty lines)
docker compose -f docker-compose.yaml config
- 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