Skip to content

feature: add solution #81

feature: add solution

feature: add solution #81

Workflow file for this run

name: Test
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Spin-up the database for tests
run: docker run --name mysql -e MYSQL_ROOT_PASSWORD=P@ssw0rd -v $(pwd):/scripts -d mysql:latest
- name: Wait for the database service to start
run: sleep 15
- name: Run the task code
run: docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/task.sql'
- name: Run the tests
run: docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/test.sql'