diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..f4cc9f2aa --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @mapbox/gl-js diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..32b6a01b0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + open-pull-requests-limit: 999 + schedule: + interval: weekly + + - package-ecosystem: github-actions + open-pull-requests-limit: 999 + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 000000000..21ab87c84 --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,27 @@ +name: Auto-merge patch dependency updates +on: pull_request + +permissions: write-all + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Approve Dependabot PRs + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..5ff9f5aec --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'yarn' + + - uses: actions/cache@v3 + with: + path: | + ~/.yarn/cache + node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - run: yarn --frozen-lockfile + - run: yarn test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1032175b5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: node_js -cache: - directories: - - node_modules -node_js: -- '14' -env: -- NODE_ENV=test -deploy: - provider: s3 - access_key_id: - secure: fTlIdiD02ljp20Ab462nXcMwBvfot5kvsXPONHlTODkMqLHRQjbzQdSn5H6/bOqcLlF+/eDYZfm0dRMNy1qa6C8YOxcKL5fd/Rdtwm4GkiJcxyPYho/Xke/X0rsVlD/y0Q/vuzGoRd78VuD6pcwXJwcwPIwMgtJMCfJRB4e2k0uGuTbOFDyaNeJLNZ6rfU7l27/c3xll+KBjfjTj88uKE9YKgzMUNiFjiMoubhctosV899FaJj/r7IxKegwZ5nXewD8Q/ZlYf0onWAd4eOzSFzBjAcgPCDtamkD7oBZtiNOd4TLITenMTz/nM7JBrQ40apoBtThHjqRXNWxO6f+Fo5USeWAs8dkycoL24oOx4IrU3fJ1TkRdtju8L9Nhe5HoFEEQZMXO7R+pYiUJp0dIsafvgDjvQdwhQLcYnsOFf0eEuTDpL7AlJiJGWQ7OenlGOZCbUnUjwu2gx1Uw/NpJ0jyFPq5xNDoIGzY2sg3JhIWv4FQT5A8HHCq+UqPuu/JSWKfZcppZZqEB7Hus0w07aIkSy3iqxcnBWlTK7YIsEYEyNa8b1qRoU1NoxavJ4EpHPy51ZyEuzdrECSJS4WgDZ8+O67DWmBhwrotT7nfcU05Ldk2+imS4Vhs5Plx8BRR7YHrZ3QORjT2w8BBgxpFJPZ0z2Pd2U3c/2RuBgoLzB5E= - secret_access_key: - secure: Mj39LRTmt3xavBkYHTxiGipJ7s2cxal7MgighqaJAQ0zE7eBQ1tAlEAqIbmirFDiwKab9v7/O4XXOXbd2IyVSuAOxto++JslPZDuxgQAA0Y9iMl18iDyofPtuT1SqQYvYNeJB3r6OCcle53NHIYMfFk59JP2cVOb7jGwHrT5/jnn8AqCHj/av7Re3RVassL03uWpwFfsbP6q62zR0p/vnHrlMQkReEwUbU0I5iPFLcFw6SAJopf/BDiQxRqnvIMXlYpbvlqTS/mglVs9Oute/Q1TdwbTciMTCDl2++F8SGG39/noZLWe5hRYKfZtvJwxkTzuB5z+fTVyQMvn7632XFaT39hOaWGktgPrRoERZIxy48lUKndOYpszTcsnohPnIpopaGs8lPlnv9MDOJBPXGF2v5Dc6QDzhzGpLGxH+exNwHja5QgKCTOxdAafRhi9SUn8zlf2s/zyRBhecu0ZQQZ46IniXdc/1jpPcpuVi/7P/NB8R/Di0jEe5JocJBUPeiABqMBljDfWgKbEs9XWJSouVe6/t/ifUwgDAVvsaW1l4lZSJw2gVBMLzLLdwA9oOGUdcvboPXbAKWGZyco7rmOpyhTagQacI7iWdMmubTpFae/ltmAahy3dxQjp31GQt7h5W7j9IpsRzLinCc77qG6AgtDnsHHSGunF2x/204Q= - bucket: mapbox-gl-js - local_dir: dist - upload-dir: plugins/mapbox-gl-draw/$TRAVIS_TAG - skip_cleanup: true - acl: public_read - on: - tags: true diff --git a/README.md b/README.md index bc8eac329..8321129ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @mapbox/mapbox-gl-draw -[![Build Status](https://travis-ci.org/mapbox/mapbox-gl-draw.svg?branch=main)](https://travis-ci.org/mapbox/mapbox-gl-draw) +![Build Status](https://github.com/mapbox/mapbox-gl-draw/actions/workflows/main.yml/badge.svg) Adds support for drawing and editing features on [mapbox-gl.js](https://www.mapbox.com/mapbox-gl-js/) maps. [See a live example here](https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/) diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 9c1d12822..000000000 --- a/circle.yml +++ /dev/null @@ -1,14 +0,0 @@ -machine: - environment: - PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" - -dependencies: - override: - - yarn - cache_directories: - - ~/.cache/yarn - -test: - override: - - yarn test -