diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..6404516 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + os_matrix: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [12.x, 14.x, 16.x] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + cache-dependency-path: 'back/package-lock.json' + + - name: run npm commands + working-directory: back + run: | + npm install + npm test