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