From c3a8b7857adb3caee44b0bdf08f0237e2bd5d1df Mon Sep 17 00:00:00 2001 From: playdingnow Date: Wed, 18 Oct 2023 13:25:43 +0800 Subject: [PATCH] test(github): try github action --- .github/workflows/node.js.yml | 22 ++++++++++++++++++++++ .travis.yml | 14 -------------- 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/node.js.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..db043d8 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,22 @@ +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x, 16.x, 18.x, 20.x] + 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 --no-fund --no-audit + - run: npm test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 49a0765..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -node_js: - - '12' - - '10' - - '8' -cache: - directories: - - $HOME/.npm - - node_modules -before_script: - - 'npm prune' -after_success: - - npm run bench - - npm run coveralls