From af41e9f8e2e49fac8a736ee8cf75123a8011fee1 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Mon, 7 Mar 2022 16:54:19 +0900 Subject: [PATCH] Use GitHub Actions instead of Travis CI --- .github/workflows/test.yml | 14 ++++++++++++++ .travis.yml | 20 -------------------- Gruntfile.js | 3 ++- 3 files changed, 16 insertions(+), 21 deletions(-) create mode 100755 .github/workflows/test.yml delete mode 100644 .travis.yml mode change 100644 => 100755 Gruntfile.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100755 index 0000000..55941a3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,14 @@ +name: test +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + - run: npm install + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c7e5b4c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: false -language: node_js -services: - - docker -addons: - hosts: - - petstore.swagger.io -matrix: - include: - - node_js: "14" - - node_js: "12" - - node_js: "10" - script: - - ./node_modules/.bin/grunt && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage -before_script: - - docker pull swaggerapi/petstore - - docker run -d -e SWAGGER_URL=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - - npm install -g istanbul coveralls - - jq '.schemes=["http"]' samples/swagger.json > samples/tmp - - mv samples/tmp samples/swagger.json diff --git a/Gruntfile.js b/Gruntfile.js old mode 100644 new mode 100755 index 09c9ac5..c53b9bd --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,7 +13,8 @@ module.exports = function (grunt) { }, simplemocha: { options: { - timeout: 10000 + timeout: 10000, + retries: 10 }, all: { src: [ 'test/**/*_spec.js' ]