-
Notifications
You must be signed in to change notification settings - Fork 163
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
20 changed files
with
15,232 additions
and
5,921 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": "standard" | ||
"root": true, | ||
"extends": "standard", | ||
"rules": { | ||
"no-var": "off" | ||
} | ||
} |
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,25 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run lint | ||
- run: | | ||
npm run commitlint -- \ | ||
--verbose \ | ||
--from `git merge-base origin/master $GITHUB_SHA` |
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,34 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
main: | ||
name: Test and Release | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.KARMARUNNERBOT_GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ env.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
- uses: browser-actions/setup-firefox@latest | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
- run: npm ci | ||
- run: | | ||
npm run commitlint -- \ | ||
--verbose \ | ||
--from `git merge-base origin/master $GITHUB_SHA` | ||
- run: npm run build | ||
- run: npm run test:unit | ||
- run: npm run test:e2e | ||
- run: npm run test:integration | ||
- run: npm run release |
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,56 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
linux: | ||
name: "Node ${{ matrix.node }} on Linux: Test" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: | ||
- 12 | ||
- 14 | ||
- 16 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: browser-actions/setup-firefox@latest | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run test:unit | ||
- run: npm run test:e2e | ||
- run: npm run test:integration | ||
windows: | ||
name: "Node ${{ matrix.node }} on Windows: Test" | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: | ||
- 12 | ||
- 14 | ||
- 16 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run test:unit | ||
- run: npm run test:e2e | ||
- run: npm run test:integration |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ node_modules/ | |
tmp/ | ||
lib/adapter.js | ||
integration-tests/ | ||
.DS_Store | ||
/karma-jasmine-*.tgz |
This file was deleted.
Oops, something went wrong.
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
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 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']} | ||
module.exports = { extends: ['@commitlint/config-angular'] } |
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,83 +1,10 @@ | ||
// Do not add new tasks. Grunt is used only for building and will be replaced. | ||
module.exports = function (grunt) { | ||
grunt.loadTasks('tasks') | ||
grunt.initConfig({ | ||
pkgFile: 'package.json', | ||
build: { | ||
adapter: ['src/adapter.js'] | ||
}, | ||
'npm-contributors': { | ||
options: { | ||
commitMessage: 'chore: update contributors' | ||
} | ||
}, | ||
conventionalChangelog: { | ||
release: { | ||
options: { | ||
changelogOpts: { | ||
preset: 'angular' | ||
} | ||
}, | ||
src: 'CHANGELOG.md' | ||
} | ||
}, | ||
conventionalGithubReleaser: { | ||
release: { | ||
options: { | ||
auth: { | ||
type: 'oauth', | ||
token: process.env.GH_TOKEN | ||
}, | ||
changelogOpts: { | ||
preset: 'angular' | ||
} | ||
} | ||
} | ||
}, | ||
bump: { | ||
options: { | ||
commitMessage: 'chore: release v%VERSION%', | ||
pushTo: 'upstream', | ||
commitFiles: [ | ||
'package.json', | ||
'CHANGELOG.md' | ||
] | ||
} | ||
}, | ||
karma: { | ||
adapter: { | ||
configFile: 'karma.conf.js', | ||
autoWatch: false, | ||
singleRun: true, | ||
reporters: ['dots'] | ||
} | ||
}, | ||
eslint: { | ||
target: [ | ||
'src/adapter.js', | ||
'lib/boot.js', | ||
'lib/index.js', | ||
'gruntfile.js', | ||
'karma.conf.js', | ||
'test/*.js', | ||
'tasks/*.js' | ||
] | ||
} | ||
}) | ||
|
||
require('load-grunt-tasks')(grunt) | ||
|
||
grunt.registerTask('test', ['build', 'karma']) | ||
grunt.registerTask('default', ['eslint', 'test']) | ||
|
||
grunt.registerTask('release', 'Bump the version and publish to NPM.', function (type) { | ||
grunt.task.run([ | ||
'build', | ||
'npm-contributors', | ||
'bump:' + (type || 'patch') + ':bump-only', | ||
'conventionalChangelog', | ||
'bump-commit', | ||
'conventionalGithubReleaser', | ||
'npm-publish' | ||
]) | ||
}) | ||
} |
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.