diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1ef8456 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history + - + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + - run: npm i -g npm@8.5.5 + - run: npm ci + - run: npm run standards + test: + needs: [ build ] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [ 12, 14, 16, 'lts/*', 'latest' ] + steps: + - uses: actions/checkout@v3 + - + name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm i -g npm@8.5.5 + - run: npm ci # Reinstall the dependencies to ensure they install with the current version of node + - run: npm test + - name: Coveralls + uses: coverallsapp/github-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ad9589a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -dist: focal -language: node_js -node_js: - - "node" # Latest node version - - "lts/*" # Latest LTS version - - "16" - - "14" - - "12" - -before_install: npm i -g npm@8.5.5 - -script: - - node --version - - npm --version - - npm run standards - - commitlint-travis - - grunt clean build - - npm test - -# For code coverage: -after_success: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage