-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
909 changed files
with
20,937 additions
and
8,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"baseDir": "dist", | ||
"files": [ | ||
{ | ||
"path": "leaflet.js" | ||
} | ||
], | ||
"reportOutput": [ | ||
[ | ||
"github", | ||
{ | ||
"checkRun": true, | ||
"commitStatus": false, | ||
"prComment": false | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: / | ||
open-pull-requests-limit: 999 | ||
rebase-strategy: disabled | ||
schedule: | ||
interval: weekly | ||
ignore: | ||
- dependency-name: eslint-config-mourner | ||
update-types: ["version-update:semver-major"] | ||
- dependency-name: sinon | ||
update-types: ["version-update:semver-major"] | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
open-pull-requests-limit: 999 | ||
rebase-strategy: disabled | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
env: | ||
NODE_VERSION: 16 | ||
jobs: | ||
setup: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-2019] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
check-latest: true | ||
cache: npm | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Cache setup | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-setup | ||
|
||
build: | ||
needs: setup | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-2019] | ||
steps: | ||
- name: Restore setup | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-setup | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Build project | ||
run: npm run build | ||
env: | ||
NODE_ENV: ${{ startsWith(github.ref, 'refs/tags/v') && 'release' || '' }} | ||
|
||
- name: Cache build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build | ||
|
||
build-release: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore setup | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-setup | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Build project | ||
run: npm run build | ||
env: | ||
NODE_ENV: release | ||
|
||
- name: Cache release build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build-release | ||
|
||
lint: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore setup | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-setup | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Run lint task | ||
run: npm run lint | ||
|
||
bundlemon: | ||
needs: build-release | ||
if: github.repository_owner == 'Leaflet' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore release build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build-release | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Run bundlemon task | ||
run: npm run bundlemon | ||
env: | ||
BUNDLEMON_PROJECT_ID: 61e0545915f6c3000980d0ed | ||
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
||
test: | ||
needs: build | ||
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- browser: Chrome1280x1024 | ||
- browser: FirefoxTouch | ||
- browser: FirefoxNoTouch | ||
- browser: IE | ||
os: windows-2019 | ||
- browser: IE10 | ||
os: windows-2019 | ||
steps: | ||
- name: Restore build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Run tests on ${{ matrix.browser }} | ||
run: npm test -- --browsers ${{ matrix.browser }} | ||
|
||
publish-artifacts: | ||
needs: build | ||
if: github.repository_owner == 'Leaflet' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build | ||
|
||
- name: Compress artifacts | ||
working-directory: dist | ||
run: zip -r leaflet.zip . | ||
|
||
- name: Publish artifacts | ||
uses: jakejarvis/s3-sync-action@v0.5.1 | ||
with: | ||
args: --acl public-read --delete --exact-timestamps | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
SOURCE_DIR: dist | ||
DEST_DIR: content/leaflet/${{ github.ref_name }} | ||
|
||
publish-npm: | ||
needs: build | ||
if: github.repository_owner == 'Leaflet' && startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore build | ||
uses: actions/cache@v3.0.2 | ||
with: | ||
path: ./* | ||
key: ${{ runner.os }}-${{ github.sha }}-build | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3.1.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Publish to NPM | ||
run: | | ||
TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?') | ||
npm publish --tag ${TAG:-latest} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.