diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 703ebcb12..7bb17dc55 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,13 +23,19 @@ jobs: git config --global user.email 'bot@opentermsarchive.org' git config --global core.autocrlf false - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 16 - - name: Start MongoDB + - name: Start MongoDB (UNIX) + if: runner.os != 'Windows' run: | mkdir /tmp/test-database mongod --dbpath /tmp/test-database --logpath /tmp/mongodb-log & + - name: Start MongoDB (Windows) + if: runner.os == 'Windows' + run: | + Set-Service MongoDB -StartupType Automatic + Start-Service -Name MongoDB + - uses: actions/setup-node@v2 + with: + node-version: 16 - run: npm ci - run: npm test