Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve OSX workflows #2308

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading