diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..84894933 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [[6.14, 10.x], [14.x], [16.x]] + steps: + - name: Checkout + uses: actions/checkout@v2 + # Some modules used require a greater Node.js version than the lowest supported (listed above). Switch to the + # second Node.js version in the tuple before installing to game the system (and switch back later before running + # the actual tests). + - name: Use Node.js ${{ matrix.node-version[1] || matrix.node-version[0] }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version[1] || matrix.node-version[0] }} + - name: Install dependencies + run: yarn --frozen-lockfile + - name: Use Node.js ${{ matrix.node-version[0] }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version[0] }} + - name: Run test suite + run: yarn test + env: + # Set the API key for the integration tests. In the future, all tests will rely on snapshots. An API key will + # then only be required to update those snapshots. The API key can then be removed from this file. + API_KEY: test_4kQQbBMEFh8QAuKVaWdpKuRpVSsdVG \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 984ddde2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: linux -dist: focal - -language: node_js -node_js: -- 6.14.0 -- 14.17.4 -- 16 - -# Set the API key for the integration tests. In the future, all tests will rely on snapshots. An API key will then only -# be required to update those snapshots. The API key can then be removed from this file. -env: - - API_KEY=test_4kQQbBMEFh8QAuKVaWdpKuRpVSsdVG - -# Some modules used require a greater Node.js version than the lowest supported (listed above). Switch to Node.js -# v12.×.× before installing to game the system, and switch back before running the actual tests. -before_install: - - > - if $(dpkg --compare-versions "${TRAVIS_NODE_VERSION}" "lt" "8.10.0"); then - nvm use v10.16.0 - fi - -before_script: - - nvm use ${TRAVIS_NODE_VERSION} \ No newline at end of file