fe-middleware/.gitea/workflows/01_test.yaml

22 lines
828 B
YAML

name: Unit Tests with docker compose
on: [push, pull_request]
jobs:
unit-test:
container:
image: docker:dind
volumes:
- /usr/local/share/.cache/yarn:/usr/local/share/.cache/yarn
- /var/lib/docker/image:/var/lib/docker/image
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
steps:
- name: Starting docker daemon
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
- name: Installing necessary packages
run: apk add yarn git curl bash
- name: Check out repository code
uses: actions/checkout@v3
- name: Install project dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Run docker-compose
run: docker compose down -v && docker compose run fe-middleware 'sleep 5 && bun test'