Skip to content

re-enabling tests on windows #80

re-enabling tests on windows

re-enabling tests on windows #80

Workflow file for this run

name: Cross-Platform Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
npm run test:win
elif [[ "${{ runner.os }}" == "macOS" ]]; then
npm run test:mac
else
npm run test:nix
fi
# run: sudo npm run test:ci
publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Set Git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Install dependencies
run: npm ci
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}