Skip to content

v++

v++ #48

Workflow file for this run

name: coverage
on: [push, pull_request, workflow_dispatch] # disabled for debug
jobs:
coveralls:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb
env:
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: test
ports:
- 3306:3306
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18
- name: npm install
run: npm install
- name: get container id
id: vars
run: DID=$(docker ps --format "{{.ID}}") && echo "DID=${DID}" >> "$GITHUB_OUTPUT"
- name: copy db test script
run: docker cp test/seed/maria.sql ${{steps.vars.outputs.DID}}:/tmp
- name: create db test
run: docker exec ${{steps.vars.outputs.DID}} /bin/bash -c 'mariadb -uroot -ptest test < /tmp/maria.sql'
- name: npm run test:ci
run: npm run test:ci
env:
CRUD_CLIENT: mysql2
CRUD_DB_URI: mysql://root:test@127.0.0.1/test
#- name: coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}