bot-api/.gitea/workflows/test.yaml

21 lines
665 B
YAML
Raw Normal View History

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:
unit-test:
2023-12-29 08:44:40 +00:00
container:
image: docker:dind
2024-01-06 16:53:35 +00:00
volumes:
- /var/lib/docker:/mnt
- /root/.npm:/root/.npm
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 npm 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: npm install --ignore-scripts
- name: Run docker-compose
run: docker compose down -v && docker compose run bot-api bun test