solution #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
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:8.0-debian | |
- name: Wait for the database service to start | |
run: sleep 15 | |
- name: Run database creation code | |
run: docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/create-database.sql' | |
- name: Run the task code | |
run: docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/task.sql' | |
- name: Run the SQL test code | |
run: docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/test.sql' > log.txt | |
- name: Run the bash tests | |
run: | | |
./test.sh |