Skip to content

chore: fix some bugs #2

chore: fix some bugs

chore: fix some bugs #2

Workflow file for this run

name: Set up mySQL service container
on:
workflow_dispatch:
schedule:
# Test 3 times a day
- cron: '0 */8 * * *'
jobs:
runner-job:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:latest
env:
DB_NAME: 'library'
DB_USER: 'root'
DB_PASS: ${{ secrets.DB_PASS }}
#
ports:
# Opens tcp port 3800 on the host and service container
- 3800:3800
steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v4
# Performs a clean installation of all dependencies in the `package.json` file
# For more information, see https://docs.npmjs.com/cli/ci.html
# - name: Install dependencies
# run: npm ci
- name: Connect to mySQL
# Runs a script that creates a mySQL table, populates
# the table with data, and then retrieves the data
# run: mysql -u
# Environment variables used by the script to create
# a new mySQL table.
env:
DB_NAME: 'library'
DB_USER: 'root'
DB_PASS: ${{ secrets.DB_PASS }}
# The hostname used to communicate with the mySQL service container
DB_HOST: localhost
# The default mySQL port
DB_PORT: 3800