-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: migrate to github actions * ci: use commitlint directly * ci: npm run build * ci: install dependencies before using commitlint * ci: fix commitlint command https://commitlint.js.org/guides/ci-setup.html#github-actions * chore: upgrade commitlint * ci: target from base sha * ci: commitlint fetch-depth=0 * ci: remove commitlint --last
- Loading branch information
Showing
8 changed files
with
637 additions
and
1,142 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Summary | ||
|
||
What is the background of this pull request? | ||
|
||
## Changes | ||
|
||
- What are the changes made in this pull request? | ||
- Change this and that, etc... | ||
|
||
## Issues | ||
|
||
What are the related issues or stories? |
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 @@ | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
NODE_ENV: ci | ||
|
||
name: "Linters" | ||
|
||
jobs: | ||
lint: | ||
name: Code Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: npm ci --ignore-scripts | ||
- run: npm run lint | ||
|
||
commit-lint: | ||
name: Commit Lint | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: npm ci --ignore-scripts | ||
- name: Validate PR commits with commitlint | ||
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |
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,29 @@ | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
env: | ||
NODE_ENV: ci | ||
|
||
name: "Pull Requests" | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
uses: ./.github/workflows/tests.yml | ||
|
||
linters: | ||
name: Linters | ||
uses: ./.github/workflows/linters.yml | ||
|
||
eslint-review: | ||
name: ESLint Review | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: reviewdog/action-eslint@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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,36 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- +([0-9])?(.{+([0-9]),x}).x | ||
|
||
env: | ||
NODE_ENV: ci | ||
|
||
name: Release | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
uses: ./.github/workflows/tests.yml | ||
|
||
linters: | ||
name: Linters | ||
uses: ./.github/workflows/linters.yml | ||
|
||
release: | ||
name: Publish Release | ||
runs-on: ubuntu-latest | ||
needs: [tests, linters] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: npm ci && npm run postinstall | ||
- run: npm run build | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-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,31 @@ | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
NODE_ENV: ci | ||
|
||
name: "Tests" | ||
|
||
jobs: | ||
run-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: npm ci && npm run postinstall | ||
- run: npm run build | ||
- run: npm run test | ||
|
||
test-build: | ||
name: Test Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: npm ci && npm run postinstall | ||
- run: npm run build |
Oops, something went wrong.