diff --git a/.github/workflows/pull_request_review.yml b/.github/workflows/pull_request_review.yml new file mode 100644 index 00000000..bcd50ce5 --- /dev/null +++ b/.github/workflows/pull_request_review.yml @@ -0,0 +1,45 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Run Tests + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build: + strategy: + matrix: + node: [10.x, 12.x] + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v2-beta + with: + node-version: ${{ matrix.node }} + + - name: Get npm cache directory + id: npm-cache + run: | + echo "::set-output name=dir::$(npm config get cache)" + - uses: actions/cache@v2 + with: + path: ${{ steps.npm-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install Dependencies + run: npm i + + - name: Run tests + run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 708ca0f3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -os: - - linux - - osx -addons: - ssh_known_hosts: - - github.com -node_js: - - 10.22.1 - - 12.18.4 - -cache: - directories: - - node_modules -install: - - npm install -script: - - npm run lint - - npm run test-with-coverage diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 6bcda5a1..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "12" -platform: - - x86 - - x64 -install: - - ps: Install-Product node $env:nodejs_version - - npm install -test_script: - - node --version - - npm --version - - npm run lint - - npm run test-with-coverage -build: off