Add fix for MacOS #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing CI | |
on: | |
- pull_request | |
- push | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: | |
- 18 | |
- 20 | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
run: | | |
brew install docker | |
brew install docker-compose | |
docker --version | |
- name: Start docker containers | |
run: | | |
docker-compose -f test-docker-compose.yml up -d pg-example redis-example | |
sleep 10 # wait for database to be ready | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm ci | |
- run: npm run dotest | |
env: | |
MODE: test |