From cdc028bf023b48d0992d7f1368b40c69b7fbad5a Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 17 Feb 2024 22:03:10 -0800 Subject: [PATCH] mac mysql start --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ec0569..1f33f2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,22 +46,39 @@ jobs: - run: npm install - run: npm test + test-mac: + needs: [ lint, get-lts ] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest] + node-version: ${{ fromJson(needs.get-lts.outputs.active) }} + fail-fast: false + steps: + - name: Start MySQL + run: | + brew install mysql + brew tap homebrew/services + brew services start mysql + mysqladmin -u root password 'root' + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + name: Node ${{ matrix.node-version }} on ${{ matrix.os }} + with: + node-version: ${{ matrix.node-version }} + - name: Initialize MySQL + run: sh sql/init-mysql.sh + - run: npm install + - run: npm test + test-win: needs: [ lint, get-lts ] runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, macos-latest] + os: [windows-latest] node-version: ${{ fromJson(needs.get-lts.outputs.active) }} fail-fast: false - services: - mysql: - image: mysql:8.2 - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: # - name: Start MySQL # run: /etc/init.d/mysql start