-
Notifications
You must be signed in to change notification settings - Fork 14
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
3 changed files
with
121 additions
and
8 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,112 @@ | ||
name: PR Evaluation | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
- edited | ||
branches: | ||
- main | ||
jobs: | ||
semantic_pr: | ||
name: Semantic PR title | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.action != 'edited' || github.event.changes.title != null }} | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
fix | ||
feat | ||
docs | ||
style | ||
refactor | ||
perf | ||
test | ||
build | ||
ci | ||
chore | ||
revert | ||
subjectPattern: ^(?![A-Z])(?=.{1,50}$).+$ | ||
subjectPatternError: > | ||
The subject "{subject}" found in the pull request title "{title}" | ||
didn't match the configured pattern. Please ensure that the subject | ||
doesn't start with an uppercase character & not have more than 50 characters. | ||
detect-unresolved-conflicts: | ||
name: Detect unresolved merge conflicts | ||
runs-on: ubuntu-latest | ||
needs: semantic_pr | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: List files with merge conflict markers | ||
run: git --no-pager grep "<<<<<<<" ":(exclude).github/" || true | ||
- name: Fail or succeed job if any files with merge conflict markers have been | ||
checked in | ||
run: exit $(git grep "<<<<<<<" ":(exclude).github/" | wc --lines) | ||
linters: | ||
name: Linting checks | ||
runs-on: ubuntu-latest | ||
needs: semantic_pr | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: Get node version | ||
id: node | ||
run: | | ||
echo "::set-output name=version::$(node -v)" | ||
- name: Get node_modules cache | ||
uses: actions/[email protected] | ||
id: node_modules | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.lock') }}-${{ | ||
steps.node.outputs.version }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run linters | ||
run: npm run lint | ||
formatter: | ||
name: Check code format | ||
runs-on: ubuntu-latest | ||
needs: semantic_pr | ||
strategy: | ||
matrix: | ||
node-version: 20.x | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Get node version | ||
id: node | ||
run: | | ||
echo "::set-output name=version::$(node -v)" | ||
- name: Get node_modules cache | ||
uses: actions/[email protected] | ||
id: node_modules | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.lock') }}-${{ | ||
steps.node.outputs.version }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run tests | ||
run: npm run format:check |
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 |
---|---|---|
|
@@ -204,10 +204,15 @@ | |
dependencies: | ||
glob "7.1.7" | ||
|
||
"@next/swc-darwin[email protected]": | ||
"@next/swc-linux-x64-gnu@13.4.19": | ||
version "13.4.19" | ||
resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.19.tgz" | ||
integrity sha512-jyzO6wwYhx6F+7gD8ddZfuqO4TtpJdw3wyOduR4fxTUCm3aLw7YmHGYNjS0xRSYGAkLpBkH1E0RcelyId6lNsw== | ||
resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.19.tgz" | ||
integrity sha512-htwOEagMa/CXNykFFeAHHvMJeqZfNQEoQvHfsA4wgg5QqGNqD5soeCer4oGlCol6NGUxknrQO6VEustcv+Md+g== | ||
|
||
"@next/[email protected]": | ||
version "13.4.19" | ||
resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.19.tgz" | ||
integrity sha512-4Gj4vvtbK1JH8ApWTT214b3GwUh9EKKQjY41hH/t+u55Knxi/0wesMzwQRhppK6Ddalhu0TEttbiJ+wRcoEj5Q== | ||
|
||
"@nodelib/[email protected]": | ||
version "2.1.5" | ||
|
@@ -1486,11 +1491,6 @@ fs.realpath@^1.0.0: | |
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" | ||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== | ||
|
||
fsevents@~2.3.2: | ||
version "2.3.3" | ||
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" | ||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== | ||
|
||
function-bind@^1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" | ||
|