-
Notifications
You must be signed in to change notification settings - Fork 8.5k
ci: add github action workflows #2596
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0e62d08
ci: add github action workflows
laojianzi 1a0ef67
test: fixed the TestUnixSocket test on windows (#20)
laojianzi dacaaac
ci: add github action workflows (#18)
laojianzi 7142c9b
Merge branch 'master' into github-actions
thinkerou d772d9c
Merge branch 'master' into github-actions
thinkerou f6397ee
Remove .travis.yml
laojianzi 1fe189c
ci: replace GITTER_ROOM_ID and upload coverage every time you go test
laojianzi ae84288
ci: update coverage using codecov/codecov-action@v1
laojianzi 3d65cdd
Merge branch 'master' into github-actions
laojianzi ec6888f
Merge branch 'master' into github-actions
thinkerou e1d5247
repo: replace travis ci to github actions
laojianzi e3f85d8
Merge branch 'master' of https://github.com/gin-gonic/gin into gin-go…
laojianzi ac5241f
Merge branch 'gin-gonic-master' into github-actions
laojianzi f71ddcb
ci: add go version 1.16
laojianzi 02d889a
fix: go install requires a specific version
laojianzi 2fdd344
Merge branch 'master' into github-actions
appleboy d8b87a3
Merge remote-tracking branch 'upstream/master' into github-actions
laojianzi 9ad4768
chore(ci): remove go 1.12 support
laojianzi d8f92db
chore(ci): remove os windows-latest
laojianzi 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 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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| - With pull requests: | ||
| - Open your pull request against `master` | ||
| - Your pull request should have no more than two commits, if not you should squash them. | ||
| - It should pass all tests in the available continuous integration systems such as TravisCI. | ||
| - It should pass all tests in the available continuous integration systems such as GitHub Actions. | ||
| - You should add/modify tests to cover your proposed code changes. | ||
| - If your pull request contains a new feature, please document it on the README. | ||
|
|
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,62 @@ | ||
| name: Run Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| test: | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| go: [1.12, 1.13, 1.14, 1.15, 1.16] | ||
| test-tags: ['', nomsgpack] | ||
| name: ${{ matrix.os }} @ Go ${{ matrix.go }} ${{ matrix.test-tags }} | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| GO111MODULE: on | ||
| TESTTAGS: ${{ matrix.test-tags }} | ||
| GOPROXY: https://proxy.golang.org | ||
| steps: | ||
| - name: Set up Go ${{ matrix.go }} | ||
| uses: actions/setup-go@v2 | ||
| with: | ||
| go-version: ${{ matrix.go }} | ||
|
|
||
| - name: Checkout Code | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: ${{ github.ref }} | ||
|
|
||
| - name: Install Dependencies | ||
| run: make tools | ||
|
|
||
| - name: Run Check | ||
| run: | | ||
| make vet | ||
| make fmt-check | ||
| make misspell-check | ||
|
|
||
| - name: Run Tests | ||
| run: make test | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v1 | ||
| notification-gitter: | ||
| needs: test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Notification failure message | ||
| if: failure() | ||
| run: | | ||
| PR_OR_COMPARE="$(if [ "${{ github.event.pull_request }}" != "" ]; then echo "${{ github.event.pull_request.html_url }}"; else echo "${{ github.event.compare }}"; fi)" | ||
| curl -d message="GitHub Actions [$GITHUB_REPOSITORY]($PR_OR_COMPARE) ($GITHUB_REF) [normal]($GITHUB_API_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) ($GITHUB_RUN_NUMBER)" -d level=error https://webhooks.gitter.im/e/7f95bf605c4d356372f4 | ||
| - name: Notification success message | ||
| if: success() | ||
| run: | | ||
| PR_OR_COMPARE="$(if [ "${{ github.event.pull_request }}" != "" ]; then echo "${{ github.event.pull_request.html_url }}"; else echo "${{ github.event.compare }}"; fi)" | ||
| curl -d message="GitHub Actions [$GITHUB_REPOSITORY]($PR_OR_COMPARE) ($GITHUB_REF) [normal]($GITHUB_API_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID) ($GITHUB_RUN_NUMBER)" https://webhooks.gitter.im/e/7f95bf605c4d356372f4 | ||
This file was deleted.
Oops, something went wrong.
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.