diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..e4a4cf8 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: + - master + - "dependabot/**" + pull_request: + branches: + - "**" + +env: + CI: true + +jobs: + test: + name: Test on Node.js ${{ matrix.node }} and ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: [10, 12] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Install latest npm + run: npm install --global npm@latest + + - name: Install dependencies + run: npm ci + + - name: Test + run: npm test