diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..7820e3f --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,58 @@ +name: Tester + +on: [push, pull_request] + +jobs: + tester: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: ['10.x', '12.x', '14.x'] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache NPM dependencies + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-npm-cache + restore-keys: ${{ runner.os }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Test + run: npm run test + env: + CI: true + coverage: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node-version: ['12.x'] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache NPM dependencies + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-npm-cache + restore-keys: ${{ runner.os }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Coverage + run: npm run test-cov + env: + CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 11164a0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js - -sudo: false - -cache: - npm: true - -node_js: - - "10" - - "12" - - "14" - -script: - - npm run eslint - - npm run test-cov - -after_script: - - npm install coveralls - - nyc report --reporter=text-lcov | coveralls diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index e7faa61..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Fix line endings in Windows. (runs before repo cloning) -init: - - git config --global core.autocrlf input - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "14" - - nodejs_version: "12" - - nodejs_version: "10" - -matrix: - fast_finish: true - -# Install scripts. (runs after repo cloning) -install: - - ps: Install-Product node $env:nodejs_version - - npm install -g npm - - npm install - -cache: - - node_modules -> package.json - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # Run tests - - npm test - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" diff --git a/package.json b/package.json index 35d3254..3b25d53 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "eslint": "eslint .", "test": "mocha test/index.js", - "test-cov": "nyc npm run test" + "test-cov": "nyc --reporter=lcovonly npm run test" }, "directories": { "lib": "./lib" @@ -52,6 +52,6 @@ "uuid": "^8.0.0" }, "engines": { - "node": ">=8.6.0" + "node": ">=10.13.0" } }