diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..82291f478 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + Tests: + runs-on: ${{ matrix.os }} + timeout-minutes: 6 + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm ci + - run: npm run build + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ef88f401c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -language: node_js -node_js: - - "lts/*" - -before_install: - - "export CHROME_BIN=/usr/bin/google-chrome" - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - -script: - - gulp test --coverage - - gulp build - - gulp package - - gulp bower - - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls || true - -sudo: required -dist: trusty - -addons: - chrome: stable - firefox: latest - -# IMPORTANT: scripts require GITHUB_AUTH_TOKEN and GITHUB_AUTH_EMAIL environment variables -# IMPORTANT: scripts has to be set executables in the Git repository (error 127) -# https://github.com/travis-ci/travis-ci/issues/5538#issuecomment-225025939 - -deploy: - - provider: script - script: ./scripts/release.sh - skip_cleanup: true - on: - branch: release - - provider: releases - api_key: $GITHUB_AUTH_TOKEN - file: - - "./dist/chartjs-plugin-zoom.js" - - "./dist/chartjs-plugin-zoom.min.js" - - "./dist/chartjs-plugin-zoom.zip" - skip_cleanup: true - on: - tags: true - - provider: npm - email: $NPM_AUTH_EMAIL - api_key: $NPM_AUTH_TOKEN - skip_cleanup: true - on: - tags: true