Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Falke-Design committed Apr 15, 2022
2 parents 9fbabe0 + 25546fc commit 8132b81
Show file tree
Hide file tree
Showing 909 changed files with 20,937 additions and 8,302 deletions.
18 changes: 18 additions & 0 deletions .bundlemonrc.json
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
}
]
]
}
19 changes: 19 additions & 0 deletions .github/dependabot.yml
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
211 changes: 211 additions & 0 deletions .github/workflows/main.yml
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 }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ dist/reference.html
coverage/
*.js.html
.mailmap
bower.json
component.json
debug/local/
Gemfile.lock
package-lock.json
yarn.lock
*.log
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8132b81

Please sign in to comment.