diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..d6fa056 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,35 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [master] + paths-ignore: + - "**.md" + - "**.json" + pull_request: + branches: [master] + paths-ignore: + - "**.md" + - "**.json" + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + node-version: [14] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + - name: Install Dependencies + run: yarn install + - run: yarn test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0f782aa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -services: - - docker - -before_install: - - docker build . -t whatsapp-media-tutorial-node - -script: - - docker run -it whatsapp-media-tutorial-node sh -c "yarn test" diff --git a/README.md b/README.md index 4d79c28..89544c4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Receive, Download, and Reply with media in WhatsApp Messages. Powered by Twilio - Node.js and Express -[![Build Status](https://travis-ci.org/TwilioDevEd/whatsapp-media-tutorial-node.svg?branch=master)](https://travis-ci.org/TwilioDevEd/whatsapp-media-tutorial-node) +[![Node.js CI](https://github.com/TwilioDevEd/whatsapp-media-tutorial-node/actions/workflows/node.js.yml/badge.svg)](https://github.com/TwilioDevEd/whatsapp-media-tutorial-node/actions/workflows/node.js.yml) [Read the full quickstart here](https://www.twilio.com/docs/sms/whatsapp/tutorial/send-and-receive-media-messages-whatsapp-nodejs)!