name: Test Suite
on:
  pull_request:
  push:
    branches:
      - main
      - 'renovate/*'
jobs:
  test:
    runs-on: ubuntu-latest
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
    strategy:
      matrix:
        node: [ '12.22.1', '14.17.0', '16.13.0' ]
        env:
          - DB: sqlite3
            NODE_ENV: testing
          - DB: mysql
            NODE_ENV: testing-mysql
    env:
      DB: ${{ matrix.env.DB }}
      NODE_ENV: ${{ matrix.env.NODE_ENV }}
      database__connection__password: root
    name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node }}

      - name: Shutdown MySQL
        run: sudo service mysql stop
        if: matrix.env.DB == 'mysql'

      - uses: mirromutth/mysql-action@v1.1
        if: matrix.env.DB == 'mysql'
        with:
          mysql version: '5.7'
          mysql database: 'km_testing'
          mysql root password: 'root'

      - run: yarn
      - run: yarn test

name: Test Suite
on:
  pull_request:
  push:
    branches:
      - main
      - 'renovate/*'
jobs:
  test:
    runs-on: ubuntu-latest
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
    strategy:
      matrix:
        node: [ '12.22.1', '14.17.0', '16.13.0' ]
        env:
          - DB: sqlite3
            NODE_ENV: testing
          - DB: mysql
            NODE_ENV: testing-mysql
    env:
      DB: ${{ matrix.env.DB }}
      NODE_ENV: ${{ matrix.env.NODE_ENV }}
      database__connection__password: root
    name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node }}

      - name: Shutdown MySQL
        run: sudo service mysql stop
        if: matrix.env.DB == 'mysql'

      - uses: mirromutth/mysql-action@v1.1
        if: matrix.env.DB == 'mysql'
        with:
          mysql version: '5.7'
          mysql database: 'km_testing'
          mysql root password: 'root'

      - run: yarn
      - run: yarn test

Update actions/setup-node action to v3
Update actions/setup-node action to v3
