|
|
|
@ -37,16 +37,63 @@ jobs:
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
|
- name: Create Pull Request
|
|
|
|
|
uses: peter-evans/create-pull-request@v5
|
|
|
|
|
- name: Setup Go
|
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
|
- name: Run go modules tidy
|
|
|
|
|
run: |
|
|
|
|
|
sudo make tidy
|
|
|
|
|
sudo make tools.verify.go-gitlint
|
|
|
|
|
echo "Run go modules tidy successfully"
|
|
|
|
|
|
|
|
|
|
- name: Run go format
|
|
|
|
|
run: |
|
|
|
|
|
sudo make format
|
|
|
|
|
echo "Run go format successfully"
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
|
|
- name: Generate all necessary files, such as error code files
|
|
|
|
|
run: |
|
|
|
|
|
make generate
|
|
|
|
|
echo "Generate all necessary files successfully"
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
|
|
- name: Run unit test and get test coverage
|
|
|
|
|
run: |
|
|
|
|
|
make cover
|
|
|
|
|
echo "Run unit test and get test coverage successfully"
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
|
|
- name: Initialize CodeQL
|
|
|
|
|
uses: github/codeql-action/init@v2
|
|
|
|
|
with:
|
|
|
|
|
token: ${{ secrets.REDBOT_GITHUB_TOKEN }}
|
|
|
|
|
commit-message: 'build: update distribution'
|
|
|
|
|
title: 'build: update distribution'
|
|
|
|
|
body: |
|
|
|
|
|
- Updates the distribution for changes on `main`
|
|
|
|
|
languages: go
|
|
|
|
|
|
|
|
|
|
Auto-generated by [create-pull-request][1]
|
|
|
|
|
- name: Build source code for host platform
|
|
|
|
|
run: |
|
|
|
|
|
sudo make build
|
|
|
|
|
echo "Build source code for host platform successfully"
|
|
|
|
|
|
|
|
|
|
[1]: https://github.com/OpenIMSDK/Open-IM-Sever
|
|
|
|
|
branch: 'bot/update-distribution'
|
|
|
|
|
- name: Perform CodeQL Analysis
|
|
|
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
|
|
|
|
|
|
- name: OpenIM verify copyright
|
|
|
|
|
run: |
|
|
|
|
|
sudo make verify-copyright
|
|
|
|
|
sudo make add-copyright
|
|
|
|
|
echo "OpenIM verify successfully"
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
|
|
- name: Create Pull Request
|
|
|
|
|
uses: peter-evans/create-pull-request@v5.0.0
|
|
|
|
|
with:
|
|
|
|
|
commit-message: Bump League Patch to ${{ steps.patch.outputs.patch }}
|
|
|
|
|
title: Bump League Patch to ${{ steps.patch.outputs.patch }}
|
|
|
|
|
body: |
|
|
|
|
|
Review criteria:
|
|
|
|
|
|
|
|
|
|
- [ ] Disenchanter can connect and issue actions
|
|
|
|
|
|
|
|
|
|
This is an automated PR.
|
|
|
|
|
<sub>[workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml).</sub>
|
|
|
|
|
branch: cicd/patch-${{ steps.patch.outputs.patch }}
|
|
|
|
|
labels: kind/documentation, area/test, ok-to-test
|