-
Couldn't load subscription status.
- Fork 482
Chris 2 需求 2 #23
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
Open
The head ref may contain hidden characters: "CHRIS-2-\u9700\u6C42-2"
Open
Chris 2 需求 2 #23
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7b2836d
Create jenkinsfile
ysqchris 929a638
commit pipeline
ysqchris e80ee14
test pipeline
ysqchris 1af58d1
Update build.gradle
ysqchris edb5a08
Update README.md
ysqchris 524d4fc
Update README.md 222
ysqchris a05a696
Create workflows
ysqchris 895516c
添加 action
ysqchris 8b7655e
提交 - CHRIS-1
ysqchris c029e64
Update README.md CHRIS-2
ysqchris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
.github/workflows/ci.yml
This file contains hidden or 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: CI Build and Test # Action 的名称 | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] # 触发条件:推送代码到 main 分支时运行 | ||
| pull_request: | ||
| branches: [ main ] # 触发条件:向 main 分支提 PR 时运行 | ||
|
|
||
| jobs: | ||
| build: # 任务名称(自定义) | ||
| runs-on: ubuntu-latest # 运行环境(可选:ubuntu-latest, windows-latest, macos-latest) | ||
|
|
||
| steps: | ||
| - name: Checkout code # 步骤1:拉取代码 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js # 步骤2:安装 Node.js(示例) | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Install dependencies # 步骤3:安装依赖 | ||
| run: npm install | ||
|
|
||
| - name: Run tests # 步骤4:运行测试 | ||
| run: npm test |
2 changes: 1 addition & 1 deletion
README.md
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
app/build.gradle
This file contains hidden or 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 hidden or 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
44 changes: 44 additions & 0 deletions
jenkinsfile
This file contains hidden or 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,44 @@ | ||
| pipeline { | ||
| agent any | ||
|
|
||
| stages { | ||
| stage('Checkout') { | ||
| steps { | ||
| checkout([$class: 'GitSCM', | ||
| branches: [[name: '*/main']], | ||
| userRemoteConfigs: [[url: 'https://github.com/username/my-android-app.git']]]) | ||
| } | ||
| } | ||
|
|
||
| stage('Build') { | ||
| steps { | ||
| sh './gradlew assembleDebug' | ||
| } | ||
| } | ||
|
|
||
| stage('Test') { | ||
| steps { | ||
| sh './gradlew test' | ||
| } | ||
| } | ||
|
|
||
| stage('Lint') { | ||
| steps { | ||
| sh './gradlew lint' | ||
| } | ||
| } | ||
|
|
||
| stage('Publish') { | ||
| steps { | ||
| sh './gradlew assembleRelease' | ||
| archiveArtifacts artifacts: 'app/build/outputs/apk/release/*.apk', fingerprint: true | ||
| } | ||
| } | ||
| } | ||
|
|
||
| post { | ||
| always { | ||
| cleanWs() | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.