Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: replace release and pr testing workflows with global ones #234

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v2
- name: Get version from package.json before release step
id: extractver
run: echo "::set-output name=version::$(npm run get-version --silent)"
run: echo "::set-output name=version::$(npm run get:version --silent)"
- name: Get name of package from package.json
id: extractname
run: echo "::set-output name=packname::$(npm run get-name --silent)"
run: echo "::set-output name=packname::$(npm run get:name --silent)"
- if: startsWith(github.event.commits[0].message, 'chore(release):')
name: Bumping latest version of this package in other repositories
uses: derberg/org-projects-dependency-manager@v1
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/pull-request-testing.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/release.yml

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/update-docs-on-docs-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Regenerate docs
run: npm run docs
- name: Generate README ToC
run: npm run gen-readme-toc
run: npm run generate:assets
- name: Create Pull Request with updated docs
# PR should be created within this GH action only if it is a docs: commit
# Otherwise it will conflict with release workflow
if: startsWith(github.event.commits[0].message, 'docs:')
uses: peter-evans/create-pull-request@v2.4.4
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update generated docs'
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
"test": "test"
},
"scripts": {
"test": "npm run test-lib && npm run test-browser",
"test": "npm run test:lib && npm run test:browser",
"bundle": "browserify lib/browser.js | uglifyjs > dist/bundle.js",
"docs": "jsdoc2md lib/parser.js -f lib/**/*.js > API.md",
"types": "jsdoc -t node_modules/tsd-jsdoc/dist -r lib -d ./ && node ./scripts/fix-ts-types.js",
"prepublishOnly": "npm run bundle && npm run docs && npm run types",
"release": "semantic-release",
"get-version": "echo $npm_package_version",
"get-name": "echo $npm_package_name",
"get:version": "echo $npm_package_version",
"get:name": "echo $npm_package_name",
"lint": "eslint --max-warnings 0 --config .eslintrc .",
"gen-readme-toc": "markdown-toc -i README.md",
"test-lib": "nyc --reporter=html --reporter=text mocha --exclude test/browser_test.js --recursive",
"test-browser": "npm run test-browser-cleanup && npm run bundle && cp dist/bundle.js test/sample_browser/ && start-server-and-test 'http-server test/sample_browser --cors -s' 8080 'mocha --timeout 3000 test/browser_test.js' && npm run test-browser-cleanup",
"test-browser-cleanup": "rimraf test/sample_browser/bundle.js"
"test:lib": "nyc --reporter=html --reporter=text mocha --exclude test/browser_test.js --recursive",
"test:browser": "npm run test:browser:cleanup && npm run bundle && cp dist/bundle.js test/sample_browser/ && start-server-and-test 'http-server test/sample_browser --cors -s' 8080 'mocha --timeout 3000 test/browser_test.js' && npm run test:browser:cleanup",
"test:browser:cleanup": "rimraf test/sample_browser/bundle.js",
"generate:readme:toc": "markdown-toc -i README.md",
"generate:assets": "npm run docs && npm run generate:readme:toc && npm run types && npm run bundle",
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION"
},
"bugs": {
"url": "https://github.com/asyncapi/parser-js/issues"
Expand Down