-
Notifications
You must be signed in to change notification settings - Fork 930
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
Ftr: Migrate travis Ci to GithubActions #752
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
40e0bc2
ci: Add github-action workflow.
sdttttt 81fb6b2
fix: GithubAction Syntax problom.
sdttttt 6b97c1f
Update go.yml
sdttttt f68bcc2
fix: Cannot use TTY in GithubActions.
sdttttt 4b8ce01
test: skip test of part in workflow.
sdttttt e9599f5
fix: workflow syntax problom.
sdttttt e1b6b23
ci: Improve DingTalk reminder information.
sdttttt cd68a25
fix: workflow syntax problom.
sdttttt 9dade15
ci: Remove sha message.
sdttttt 5912f60
ci: Add `develop` branch trigger CI.
sdttttt 66d429d
ci
sdttttt 0bc4334
Merge pull request #3 from apache/develop
sdttttt 8d91ba5
Update go.yml
sdttttt 3f38d24
fix: workflow syntax problom.
sdttttt d3f5f84
feat: Cache build dependencies on GithubActnions.
sdttttt a40f153
ci: Delete redundant code.
sdttttt 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
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,79 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master", "develop"] | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
|
||
build: | ||
name: ubuntu-latest ${{ matrix.config.go_version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- go_version: 1.13 | ||
steps: | ||
|
||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.config.go_version }} | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
if [ -f Gopkg.toml ]; then | ||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
dep ensure | ||
fi | ||
|
||
- name: License Check | ||
run: | | ||
go fmt ./... && [[ -z `git status -s` ]] | ||
sh before_validate_license.sh | ||
chmod u+x /tmp/tools/license/license-header-checker | ||
/tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]] | ||
|
||
- name: Test | ||
run: | | ||
chmod u+x before_ut.sh && ./before_ut.sh | ||
go mod vendor && go test ./... -coverprofile=coverage.txt -covermode=atomic | ||
chmod +x integrate_test.sh && ./integrate_test.sh | ||
|
||
- name: Coverage | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
- name: DingTalk Message Notify | ||
# You may pin to the exact commit or the version. | ||
# uses: zcong1993/actions-ding@2a68a4d06ed966d2e5c28178e7187c107ec57862 | ||
uses: zcong1993/actions-ding@v3.0.1 | ||
if: ${{ github.repository == 'apache/dubbo-go' }} | ||
with: | ||
# DingDing bot token | ||
dingToken: 6374f1bf8d4f23cde81d4a4b8c1f0bc98cc92b5151ca938ab938d3d7f4230fc4 | ||
secret: SECa98677289194bb0e5caec3051301d06515750ff1bd2f932a4704298afb2e0ae6 | ||
# Post Body to send | ||
body: | | ||
{ | ||
"msgtype": "markdown", | ||
"markdown": { | ||
"title": "Github Actions", | ||
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - ref: ${{ github.ref }} \n - status: ${{ job.status }} \n - environment: ${{ runner.os }}" | ||
} | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted this parameter, because cannot be used
TTY(模拟终端)
in GithubActions.