24 lines
876 B
YAML
24 lines
876 B
YAML
name: Unit Tests with docker compose
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
unit-test:
|
|
container:
|
|
image: docker:dind
|
|
volumes:
|
|
- /root/.npm:/root/.npm
|
|
- /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 git curl bash
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Install bun.sh
|
|
run: curl https://raw.githubusercontent.com/LowByteFox/bun-musl/main/bun-musl -o bun-musl && ./bun-musl install
|
|
- name: Install project dependencies
|
|
run: bun install
|
|
- name: Run docker-compose
|
|
run: docker compose down -v && docker compose run bot-api bun test |