-
Notifications
You must be signed in to change notification settings - Fork 12
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
921 changed files
with
43,733 additions
and
0 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,10 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
trim_trailing_whitespace = true |
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,48 @@ | ||
--- | ||
name: "Bug Report" | ||
about: Report a bug | ||
--- | ||
<!-- | ||
Oh hi there! | ||
To expedite issue processing please search open and closed issues before submitting a new one. | ||
Existing issues often contain information about workarounds, resolution, or progress updates. | ||
--> | ||
|
||
|
||
# Bug Report | ||
|
||
### Description | ||
<!-- edit: --> A clear and concise description of the problem... | ||
|
||
### Is this a regression? | ||
|
||
<!-- Did this behavior use to work in the previous version? --> | ||
<!-- edit: --> Yes, the previous version in which this bug was not present was: .... | ||
|
||
## Exception or Error | ||
<pre><code> | ||
<!-- If the issue is accompanied by an exception or an error, please share it below: --> | ||
|
||
</code></pre> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- Please provide detailed steps for reproducing the issue. --> | ||
|
||
1. step 1 | ||
2. step 2 | ||
3. you get it... | ||
|
||
## Context | ||
|
||
<!-- | ||
Please provide any relevant information about your setup. | ||
This is important in case the issue is not reproducible except for under certain conditions. | ||
--> | ||
|
||
* Operating System: | ||
* JDK version: | ||
* Application version: |
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,26 @@ | ||
--- | ||
name: "Feature Request" | ||
about: Suggest a feature | ||
--- | ||
<!-- | ||
Oh hi there! | ||
To expedite issue processing please search open and closed issues before submitting a new one. | ||
Existing issues often contain information about workarounds, resolution, or progress updates. | ||
--> | ||
|
||
|
||
# Feature Request | ||
|
||
### Description | ||
<!-- edit: --> A clear and concise description of the problem or missing capability... | ||
|
||
|
||
### Describe the solution you'd like | ||
<!-- edit: --> If you have a solution in mind, please describe it. | ||
|
||
|
||
### Describe alternatives you've considered | ||
<!-- edit: --> Have you considered any alternative solutions or workarounds? |
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 @@ | ||
blank_issues_enabled: false |
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,42 @@ | ||
## PR Checklist | ||
Please check if your PR fulfills the following requirements: | ||
|
||
- [ ] The commit message follows our guidelines: https://github.com/jinganix/guess/blob/master/CONTRIBUTING.md#commit | ||
- [ ] Tests for the changes have been added (for bug fixes / features) | ||
- [ ] Docs have been added / updated (for bug fixes / features) | ||
|
||
|
||
## PR Type | ||
What kind of change does this PR introduce? | ||
|
||
<!-- Please check the one that applies to this PR using "x". --> | ||
|
||
- [ ] Bugfix | ||
- [ ] Feature | ||
- [ ] Code style update (formatting, local variables) | ||
- [ ] Refactoring (no functional changes, no api changes) | ||
- [ ] Build related changes | ||
- [ ] CI related changes | ||
- [ ] Documentation content changes | ||
- [ ] Other... Please describe: | ||
|
||
|
||
## What is the current behavior? | ||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
||
Issue Number: N/A | ||
|
||
|
||
## What is the new behavior? | ||
|
||
|
||
## Does this PR introduce a breaking change? | ||
|
||
- [ ] Yes | ||
- [ ] No | ||
|
||
|
||
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> | ||
|
||
|
||
## Other information |
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,17 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
":semanticCommits" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ | ||
"minor", | ||
"patch" | ||
], | ||
"matchCurrentVersion": "!/^0/", | ||
"automerge": true | ||
} | ||
] | ||
} |
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,42 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 10 * * *' # Once per day at 10am UTC | ||
|
||
jobs: | ||
commitlint: | ||
name: Check Commit Message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5 | ||
with: | ||
configFile: package.json | ||
failOnWarnings: true | ||
build: | ||
name: Build | ||
needs: [ commitlint ] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
jdk: [ 21 ] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup JDK ${{ matrix.jdk }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.jdk }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
- name: Build with Gradle | ||
run: ./gradlew clean build |
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,40 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
commitlint: | ||
name: Check Commit Message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5 | ||
with: | ||
configFile: package.json | ||
failOnWarnings: true | ||
build: | ||
name: Build | ||
needs: [ commitlint ] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
jdk: [ 21 ] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup JDK ${{ matrix.jdk }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.jdk }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
- name: Build with Gradle | ||
run: ./gradlew clean build |
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,11 @@ | ||
*.iml | ||
.DS_Store | ||
.env.local | ||
.gradle | ||
.idea | ||
.run | ||
.tmp | ||
LOG_DIR_IS_UNDEFINED | ||
build | ||
logs | ||
node_modules |
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 @@ | ||
_ |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "" |
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,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
branch="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
if [ "$branch" = "master" ]; then | ||
echo "Never commit to [$branch] directly" | ||
exit 1 | ||
fi |
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,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
branch="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
if [ "$branch" = "master" ]; then | ||
echo "Never push to [$branch] directly" | ||
exit 1 | ||
fi |
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,2 @@ | ||
java openjdk-21.0.1 | ||
nodejs 20.11.0 |
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,17 @@ | ||
# Contributing | ||
|
||
## Conventional Commits | ||
|
||
Check if your commit messages meet the [conventional commit format](https://conventionalcommits.org). | ||
|
||
The conventional config extends from [config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional). | ||
|
||
## Create a commit | ||
|
||
Run `npm install` in root directory, then you will get [Commitizen](https://github.com/commitizen-tools/commitizen) installed. | ||
|
||
Use `npm run cz` or `npx cz` to create a commit. | ||
|
||
## Workflow validation | ||
|
||
Commit message will be validated by workflow. If the validation is fail, amend the commit and rerun validation action. |
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,10 @@ | ||
[](https://github.com/jinganix/guess/actions/workflows/ci.yml) | ||
[](http://www.apache.org/licenses/LICENSE-2.0.html) | ||
|
||
# Guess | ||
|
||
The source code of the 'Guess Who I Am' Wechat miniprogram | ||
|
||
## Contributing | ||
|
||
If you are interested in reporting/fixing issues and contributing directly to the code base, please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started. |
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,82 @@ | ||
import utils.Props | ||
import utils.createConfiguration | ||
import utils.extractDependencies | ||
|
||
plugins { | ||
id("jacoco.aggregation") | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
val buildSrcDependencies = extractDependencies(file("${rootDir}/buildSrc/build.gradle.kts")) | ||
|
||
configurations.implementation.get().dependencies.forEach { | ||
if (it is ModuleDependency) { | ||
it.isTransitive = false | ||
} | ||
} | ||
|
||
val incomingClassDirs = createConfiguration("incomingClassDirs", "classDirs") { | ||
extendsFrom(configurations.implementation.get()) | ||
isCanBeResolved = true | ||
isCanBeConsumed = false | ||
} | ||
|
||
val incomingSourceDirs = createConfiguration("incomingSourceDirs", "sourceDirs") { | ||
extendsFrom(configurations.implementation.get()) | ||
isCanBeResolved = true | ||
isCanBeConsumed = false | ||
} | ||
|
||
val incomingCoverageData = createConfiguration("incomingCoverageData", "coverageData") { | ||
extendsFrom(configurations.implementation.get()) | ||
isCanBeResolved = true | ||
isCanBeConsumed = false | ||
} | ||
|
||
fun updateJacocoReport(base: JacocoReportBase) { | ||
base.additionalClassDirs(incomingClassDirs.incoming.artifactView { | ||
lenient(true) | ||
}.files.asFileTree.matching { | ||
}) | ||
base.additionalSourceDirs(incomingSourceDirs.incoming.artifactView { lenient(true) }.files) | ||
base.executionData(incomingCoverageData.incoming.artifactView { lenient(true) }.files.filter { it.exists() }) | ||
} | ||
|
||
val coverageVerification by tasks.registering(JacocoCoverageVerification::class) { | ||
enabled = Props.coverage | ||
updateJacocoReport(this) | ||
|
||
violationRules { | ||
rule { limit { minimum = BigDecimal.valueOf(Props.jacocoMinCoverage) } } | ||
} | ||
} | ||
|
||
val coverage by tasks.registering(JacocoReport::class) { | ||
enabled = Props.coverage | ||
updateJacocoReport(this) | ||
|
||
reports { | ||
xml.required.set(true) | ||
html.required.set(true) | ||
} | ||
} | ||
|
||
val configCoveralls by tasks.registering(DefaultTask::class) { | ||
coveralls { | ||
sourceDirs = incomingSourceDirs.incoming.artifactView { lenient(true) }.files.map { | ||
it.absolutePath | ||
} | ||
jacocoReportPath = "build/reports/jacoco/coverage/coverage.xml" | ||
} | ||
} | ||
|
||
tasks.coveralls { | ||
dependsOn(configCoveralls) | ||
} | ||
|
||
tasks.check { | ||
dependsOn(coverageVerification) | ||
} |
Oops, something went wrong.