bot-api/.gitea/workflows/01_test.yaml

27 lines
856 B
YAML
Raw Normal View History

name: Unit Tests with docker compose
on:
pull_request:
push:
branches:
- main
- develop
2023-12-25 13:36:13 +00:00
jobs:
unit-test:
2023-12-29 08:44:40 +00:00
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
2023-12-25 13:36:13 +00:00
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
2023-12-25 13:36:13 +00:00
- 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 bot-api bun test