Skip to content

Merge pull request #572 from mynaparrot/renovate/github.com-urfave-cl… #1089

Merge pull request #572 from mynaparrot/renovate/github.com-urfave-cl…

Merge pull request #572 from mynaparrot/renovate/github.com-urfave-cl… #1089

Workflow file for this run

name: Test CI
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
redis:
image: redis:6
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
mariadb:
image: mariadb:10.11
env:
MYSQL_USER: root
MYSQL_DATABASE: plugnmeet
MYSQL_ROOT_PASSWORD: 12345
MYSQL_CHARACTER_SET_SERVER: utf8mb4
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: "20.x"
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
- name: setup go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Prepare for test
run: |
mysql -u root -p12345 -h 127.0.0.1 -P 3306 -D plugnmeet < sql_dump/install.sql
git clone https://github.com/mynaparrot/plugNmeet-client client
cd client
pnpm install && pnpm run build
- name: Run docker-compose
uses: isbang/[email protected]
with:
compose-file: "./test/docker-compose.yaml"
down-flags: "--volumes"
- name: Sleep for 20s
uses: juliangruber/sleep-action@v2
with:
time: 20s
- name: Check logs
run: |
cd ./test
docker ps
docker compose logs
- name: Run test
#run: go test -cover -race -v ./...
run: |
cp ./test/config.yaml config.yaml
go test -timeout 2m -cover -race -v ./...