diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..371fd95 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node-version: [16.x, 18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + include: + - os: ubuntu-latest + node-version: 14.x + - os: ubuntu-latest + node-version: 12.x + - os: ubuntu-latest + node-version: 10.x + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + # Can not use cache as package-lock.json is not commited in Git + # cache: 'npm' + - run: npm install --fallback-to-build=false + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bceec47..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js - -node_js: - - "0.10" - - "4" - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libstdc++6 # upgrade libstdc++ on linux to support C++11 - -sudo: false - -install: - - npm install --fallback-to-build=false - -script: - - npm test diff --git a/README.md b/README.md index c756dc3..5663f4a 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ uses [node-mapnik](http://github.com/mapnik/node-mapnik) to render tiles and grids from a Mapnik XML file. `tilelive-mapnik` implements the [Tilesource API](https://github.com/mapbox/tilelive.js/blob/master/API.md). -[![Build Status](https://travis-ci.com/mapbox/tilelive-mapnik.svg?branch=master)](http://travis-ci.com/mapbox/tilelive-mapnik) -[![Build status](https://ci.appveyor.com/api/projects/status/6am7la0hiaei8qop)](https://ci.appveyor.com/project/Mapbox/tilelive-mapnik) +[![build status](https://github.com/mapbox/tilelive-mapnik/actions/workflows/build.yml/badge.svg)](https://github.com/mapbox/tilelive-mapnik/actions/workflows/build.yml) ## Installation diff --git a/package.json b/package.json index afd8ecb..3270132 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "dependencies": { "step": "~0.0.5", "generic-pool": "~2.4.0", - "mapnik": "~3.7.0", + "mapnik": "~4.5", "mime": "~1.3.4" }, "devDependencies": {