Skip to content

Commit

Permalink
ci: improve OSX workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Dec 5, 2023
1 parent 1aec4fd commit aa3952d
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/ci-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:

jobs:
tests-osx:
runs-on: macos-13
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -25,7 +25,7 @@ jobs:
mysql_connection_url_key: [""]
# TODO - add mariadb to the matrix. currently few tests are broken due to mariadb incompatibilities
include:
# 20.x
# 20.x
- node-version: "20.x"
mysql-version: "mysql:8.0.33"
use-compression: 1
Expand All @@ -44,12 +44,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: install lima
run: brew install lima
- name: Install Colima
run: brew install colima

- name: Install Docker
run: brew install --formula docker

- name: Start Docker
run: colima start

- name: Pull MySQL
if: ${{ matrix.mysql-version }}
run: docker pull ${{ matrix.mysql-version }}

- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1-alpha

- name: Set up MySQL
if: ${{ matrix.mysql-version }}
run: docker run -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_DATABASE=${{ env.MYSQL_DATABASE }} -p ${{ env.MYSQL_PORT }}:3306 ${{ matrix.mysql-version }}
Expand All @@ -65,7 +72,7 @@ jobs:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install npm dependencies
run: npm ci

Expand All @@ -78,4 +85,4 @@ jobs:

- name: Run tests with built-in node test runner
if: ${{ matrix.use-builtin-test-runner }}
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run test:builtin-node-runner
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run test:builtin-node-runner

0 comments on commit aa3952d

Please sign in to comment.