2023-12-29 16:53:29 +00:00
|
|
|
name: Unit Tests with docker compose
|
2023-12-25 13:36:13 +00:00
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
2023-12-25 13:40:10 +00:00
|
|
|
on: [pull_request]
|
2023-12-25 13:36:13 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-12-29 15:08:09 +00:00
|
|
|
unit-test:
|
2023-12-29 15:16:57 +00:00
|
|
|
container:
|
2023-12-29 17:13:25 +00:00
|
|
|
image: docker:dind
|
2023-12-25 13:36:13 +00:00
|
|
|
steps:
|
2023-12-29 17:48:40 +00:00
|
|
|
- name: Starting docker daemon
|
2023-12-29 17:34:15 +00:00
|
|
|
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
2023-12-29 16:55:36 +00:00
|
|
|
- name: Installing necessary packages
|
2023-12-29 18:28:38 +00:00
|
|
|
run: apk add nodejs git curl bash
|
2023-12-25 13:36:13 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2023-12-29 17:38:25 +00:00
|
|
|
- name: Install project dependencies
|
2023-12-31 10:31:46 +00:00
|
|
|
run: docker run -w /usr/src/app -v ./:/usr/src/app oven/bun:1 bun install
|
2023-12-29 16:53:29 +00:00
|
|
|
- name: Run docker-compose
|
2023-12-29 21:01:23 +00:00
|
|
|
run: docker compose down -v && docker compose run bot-api ping mongodb
|