-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automated using bump-everywhere + more quality checks (#8)
- new workflows - linting commands & linted stuff - security checks & fixed audited vulnerabilities - updated documentation
- Loading branch information
1 parent
997be71
commit 4a91e8c
Showing
13 changed files
with
3,447 additions
and
1,528 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,23 @@ | ||
name: Bump & release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- master | ||
push: # Ensure a new release is created for each new tag | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
bump-version-and-release: | ||
if: > # Push => Ensure only changes from master. PR => to not trigger when closing PR without merging | ||
(github.event_name == 'push' && github.event.base_ref == 'refs/heads/master') | ||
|| github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
uses: undergroundwires/bump-everywhere@master | ||
with: | ||
user: undergroundwires-bot | ||
release-token: ${{secrets.BUMP_GITHUB_PAT}} # Does not trigger release pipeline if we use default token: https://github.community/t5/GitHub-Actions/Github-Action-trigger-on-release-not-working-if-releases-was/td-p/34559 |
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,31 +1,11 @@ | ||
name: Build & deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: [created] # will be triggered when a NON-draft release is created and published. | ||
|
||
jobs: | ||
increase-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
This comment has been minimized.
Sorry, something went wrong. |
||
- uses: actions/setup-node@v1 | ||
with: | ||
This comment has been minimized.
Sorry, something went wrong. |
||
node-version: '12.x' | ||
- name: Setup GIT | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "$GITHUB_ACTOR" | ||
- name: Install and Publish | ||
run: | | ||
npm version patch -m "🚀 upgraded to %s" | ||
git push --set-upstream origin master && git push --tags | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
build-and-deploy: | ||
needs: increase-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
|
@@ -98,11 +78,12 @@ jobs: | |
uses: actions/checkout@v2 | ||
with: | ||
path: site | ||
ref: master # otherwise we don't get version bump commit | ||
- | ||
name: "App: Setup node" | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
node-version: '14.x' | ||
- | ||
name: "App: Install dependencies" | ||
run: npm install | ||
|
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,37 @@ | ||
name: Quality checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- | ||
name: Install dependencies | ||
run: npm ci | ||
- | ||
name: Lint vue | ||
run: npm run lint:vue | ||
- | ||
name: Lint yaml | ||
run: npm run lint:yaml | ||
- | ||
name: 'Validate md: Relative URLs' | ||
run: npm run lint:md:relative-urls | ||
- | ||
name: 'Validate md: Enforce standards' | ||
run: npm run lint:md | ||
- | ||
name: 'Validate md: Ensure consistency' | ||
run: npm run lint:md:consistency |
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,24 @@ | ||
name: Security checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
npm-audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- | ||
name: NPM audit | ||
run: npm audit |
13 changes: 8 additions & 5 deletions
13
.github/workflows/run-tests.yaml → .github/workflows/test.yaml
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,22 +1,25 @@ | ||
name: Run tests | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '11.x' | ||
node-version: '14.x' | ||
- | ||
name: Install dependencies | ||
run: npm install | ||
run: npm ci | ||
- | ||
name: Run tests | ||
run: npm run test:unit |
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,4 @@ | ||
{ | ||
"default": true, | ||
"MD013": false | ||
} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
2961f69f-d3d2-4f42-8aa2-d7ed4570fd49Nov 13, 2021