0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-01-12 11:38:11 +00:00
crazy-max_diun/.github/workflows/e2e.yml
dependabot[bot] 9866739331
chore(deps): bump docker/bake-action from 4 to 5
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4 to 5.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 06:52:29 +00:00

97 lines
2.5 KiB
YAML

name: e2e
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
- 'v*'
paths-ignore:
- '**.md'
pull_request:
branches:
- 'master'
- 'v*'
paths-ignore:
- '**.md'
env:
BUILD_TAG: 'diun:local'
CONTAINER_NAME: 'diun'
jobs:
e2e:
runs-on: ubuntu-latest
services:
redis:
image: redis:6.2.3-alpine
cloudflared:
image: crazymax/cloudflared:latest
options: >-
--label "diun.enable=true"
--label "diun.watch_repo=true"
strategy:
fail-fast: false
matrix:
include:
- folder: docker1
loglevel: debug
- folder: docker2
loglevel: info
- folder: docker3
loglevel: info
- folder: docker4
loglevel: info
- folder: docker5
loglevel: info
- folder: dockerfile1
loglevel: debug
- folder: dockerfile2
loglevel: debug
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v5
with:
targets: image-local
pull: true
-
name: Start container
run: |
volFlags="-v $(pwd)/test/${{ matrix.folder }}/diun.yml:/diun.yml:ro"
volFlags="-v /var/run/docker.sock:/var/run/docker.sock ${volFlags}"
if [ -d "$(pwd)/test/${{ matrix.folder }}/mount" ]; then
volFlags="-v $(pwd)/test/${{ matrix.folder }}/mount:/mount ${volFlags}"
fi
docker run -d --name ${{ env.CONTAINER_NAME }} ${volFlags} \
-e "TZ=Europe/Paris" \
-e "LOG_LEVEL=${{ matrix.loglevel }}" \
${{ env.BUILD_TAG }}
-
name: Check container logs
uses: crazy-max/.github/.github/actions/container-logs-check@main
with:
container_name: ${{ env.CONTAINER_NAME }}
log_check: "Next run in"
timeout: 240
-
name: List images in db
run: |
docker exec -t ${{ env.CONTAINER_NAME }} diun image list
-
name: Container logs
if: always()
run: |
docker logs ${{ env.CONTAINER_NAME }}
docker rm -f ${{ env.CONTAINER_NAME }} > /dev/null 2>&1 || true