Skip to content

build using docker compose #32

build using docker compose

build using docker compose #32

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Build
run: |
set -euxo pipefail
docker compose build
docker compose --profile test build
- name: Test
run: |
set -euxo pipefail
# execute the gitea git server.
docker compose up --detach
# wait for gitea to be available.
GIT_USER_USERNAME=jane.doe
GIT_USER_PASSWORD=password
while [ -z "$(
curl \
-s \
-u "$GIT_USER_USERNAME:$GIT_USER_PASSWORD" \
-X GET \
-H 'Accept: application/json' \
"http://localhost:3000/api/v1/repos/$GIT_USER_USERNAME/test" \
| grep test)" ]; do
sleep 3
done
# execute our application.
docker compose run test
# list the local repository log.
git --git-dir tmp/test/.git log --oneline