From 5102bc76dfe0cc93999a415280b80daf38b18ca5 Mon Sep 17 00:00:00 2001 From: Sehrope Sarkuni Date: Fri, 5 Jan 2024 11:57:55 -0500 Subject: [PATCH] Add windows and macos to CI build matrix --- .github/workflows/ci.yml | 15 +++++++++++++-- Makefile | 12 ++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9747861..b5ac265 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,7 @@ jobs: run: make clean deps lint test: - name: Test - Node v${{ matrix.node_version }} - runs-on: ubuntu-latest + name: Test - ${{ matrix.os }} x Node v${{ matrix.node_version }} strategy: fail-fast: false matrix: @@ -29,6 +28,8 @@ jobs: - '20' - 'lts/*' - 'latest' + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Setup Node @@ -36,6 +37,16 @@ jobs: with: node-version: ${{ matrix.node_version }} cache: npm + - name: Setup docker (MacOS) + if: runner.os == 'macos' + run: | + brew install docker + colima start + - name: Show env + run: | + node --version + uname -a + docker --version - name: Compile run: make clean deps compile - name: Setup Postgres diff --git a/Makefile b/Makefile index ffbc1c5..dc12236 100644 --- a/Makefile +++ b/Makefile @@ -9,28 +9,28 @@ clean: rm -rf lib node_modules coverage compile: - node_modules/.bin/tsc --declaration + ./node_modules/.bin/tsc --declaration watch: - node_modules/.bin/tsc --watch --declaration + ./node_modules/.bin/tsc --watch --declaration test: - node_modules/.bin/ts-mocha test/suite.ts --exit $(TEST_ARGS) + ./node_modules/.bin/ts-mocha test/suite.ts --exit $(TEST_ARGS) clean-cov: rm -rf coverage test-cov: - node_modules/.bin/c8 \ + ./node_modules/.bin/c8 \ --require source-map-support/register \ --require ts-node/register \ --reporter=html \ --reporter=lcov \ --extension .ts \ - node_modules/.bin/ts-mocha --exit test/suite.ts + ./node_modules/.bin/ts-mocha --exit test/suite.ts lint: - node_modules/.bin/eslint src + ./node_modules/.bin/eslint src package: clean deps compile