-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from spring-media/SPR-4690/PR-Checker
Spr 4690/pr checker
- Loading branch information
Showing
15 changed files
with
539 additions
and
310 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,71 @@ | ||
name: Checks | ||
on: | ||
pull_request: | ||
# we're doing the filtering for branches and actions in each step, | ||
# this one here works not as expected and could be misleading | ||
# branches: | ||
# - migrating-to-yaml-syntax | ||
# - master | ||
# action: | ||
# - opened | ||
# - edited | ||
# - synchronize | ||
jobs: | ||
checks: | ||
name: Formatting checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/checkout@master | ||
|
||
- name: Install npm | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/npm@master | ||
with: | ||
args: install | ||
|
||
- name: Npm check | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/npm@master | ||
with: | ||
args: run check --if-present | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/checkout@master | ||
|
||
- name: Checkout master | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/checkout@master | ||
with: | ||
ref: master | ||
|
||
- name: Check merge | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
run: | | ||
git config --global user.name "Spring Media CD" | ||
git config --global user.email "[email protected]" | ||
git merge ${{ github.event.pull_request.head.sha }} -m"prchecker" --stat | ||
- name: Install npm | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/npm@master | ||
with: | ||
args: install | ||
|
||
- name: Test npm | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/npm@master | ||
with: | ||
args: run test | ||
|
||
- name: Build npm | ||
if: github.event.action == 'opened' || github.event.action == 'edited' || github.event.action == 'synchronize' | ||
uses: actions/npm@master | ||
with: | ||
args: run build |
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,46 @@ | ||
name: Deployment | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
checks: | ||
name: Formatting checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@master | ||
|
||
- name: Install npm | ||
uses: actions/npm@master | ||
with: | ||
args: install | ||
|
||
- name: Npm check | ||
uses: actions/npm@master | ||
with: | ||
args: run check --if-present | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@master | ||
|
||
|
||
- name: Install npm | ||
uses: actions/npm@master | ||
with: | ||
args: install | ||
|
||
- name: Test npm | ||
uses: actions/npm@master | ||
with: | ||
args: run test | ||
|
||
- name: Build npm | ||
uses: actions/npm@master | ||
with: | ||
args: run build |
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 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 |
---|---|---|
@@ -1 +1 @@ | ||
export declare function provide(packageName: string, pack: any): any; | ||
export declare function provide(packageNameActual: string, packActual: any): any; |
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
function provide(packageName, pack) { | ||
// -- START -- static loader | ||
var unresolvedPackages = {}; | ||
var providedPackages = {}; | ||
var loaderName = 'pssmasloader'; | ||
var loader = window[loaderName] = window[loaderName] || { | ||
_: { | ||
u: unresolvedPackages, | ||
p: providedPackages, | ||
}, | ||
require: function (packageName, cb) { | ||
var pack = providedPackages[packageName]; | ||
if (pack !== undefined) { | ||
cb(pack, null); | ||
} | ||
else { | ||
unresolvedPackages[packageName] = unresolvedPackages[packageName] || []; | ||
unresolvedPackages[packageName].push(cb); | ||
} | ||
}, | ||
}; | ||
unresolvedPackages = loader._.u; | ||
providedPackages = loader._.p; | ||
// -- END -- static loader | ||
var unresolvedRequires = unresolvedPackages[packageName] || []; | ||
providedPackages[packageName] = pack; | ||
for (var i = 0; i < unresolvedRequires.length; i++) { | ||
unresolvedRequires[i](pack, null); | ||
} | ||
return pack; | ||
function provide(packageNameActual, packActual) { | ||
// -- START -- static loader | ||
var unresolvedPackages = {}; | ||
var providedPackages = {}; | ||
var loaderName = "pssmasloader"; | ||
var loader = (window[loaderName] = window[loaderName] || { | ||
_: { | ||
u: unresolvedPackages, | ||
p: providedPackages | ||
}, | ||
require: function (packageName, cb) { | ||
var pack = providedPackages[packageName]; | ||
if (pack !== undefined) { | ||
cb(pack, null); | ||
} | ||
else { | ||
unresolvedPackages[packageName] = unresolvedPackages[packageName] || []; | ||
unresolvedPackages[packageName].push(cb); | ||
} | ||
} | ||
}); | ||
unresolvedPackages = loader._.u; | ||
providedPackages = loader._.p; | ||
// -- END -- static loader | ||
var unresolvedRequires = unresolvedPackages[packageNameActual] || []; | ||
providedPackages[packageNameActual] = packActual; | ||
for (var i = 0; i < unresolvedRequires.length; i++) { | ||
unresolvedRequires[i](packActual, null); | ||
} | ||
return packActual; | ||
} | ||
|
||
export { provide }; |
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
Oops, something went wrong.