2023-12-31 11:11:22 +00:00
|
|
|
name: Unit Tests with docker compose
|
2023-12-25 13:40:10 +00:00
|
|
|
on: [pull_request]
|
2023-12-25 13:36:13 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-12-31 11:11:22 +00:00
|
|
|
unit-test:
|
2023-12-29 08:44:40 +00:00
|
|
|
container:
|
2023-12-31 11:11:22 +00:00
|
|
|
image: docker:dind
|
2024-01-06 16:53:35 +00:00
|
|
|
volumes:
|
2024-01-06 18:45:59 +00:00
|
|
|
- /usr/local/share/.cache/yarn:/usr/local/share/.cache/yarn
|
2024-01-06 17:32:00 +00:00
|
|
|
- /var/lib/docker/image:/var/lib/docker/image
|
2024-01-06 17:43:06 +00:00
|
|
|
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
2023-12-25 13:36:13 +00:00
|
|
|
steps:
|
2023-12-31 11:11:22 +00:00
|
|
|
- name: Starting docker daemon
|
|
|
|
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
|
|
|
- name: Installing necessary packages
|
2024-01-06 17:25:49 +00:00
|
|
|
run: apk add yarn git curl bash
|
2023-12-25 13:36:13 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2023-12-31 11:11:22 +00:00
|
|
|
- name: Install project dependencies
|
2024-01-06 17:37:13 +00:00
|
|
|
run: yarn install --frozen-lockfile --ignore-scripts
|
2023-12-31 11:11:22 +00:00
|
|
|
- name: Run docker-compose
|
|
|
|
run: docker compose down -v && docker compose run bot-api bun test
|