Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
ci: Sync github actions (#57)
Browse files Browse the repository at this point in the history
* Delete not allowed file: .github/workflows/diff-check.yml

* Delete not allowed file: .github/workflows/gofmt.yml

* Delete not allowed file: .github/workflows/auto-build.yml

* Delete not allowed file: .github/workflows/codeql-analysis.yml

* Add new file: .github/workflows/build-test.yml

* Add new file: .github/workflows/unit-test.yml

* Add new file: .github/workflows/auto-merge.yml
  • Loading branch information
BeyondRobot authored Sep 22, 2021
1 parent e3724d3 commit f49a4e8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: "1.15"
go-version: "1.16"

- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -42,8 +42,14 @@ jobs:
with:
commit_message: Auto build to generate code

- name: Enable auto-merge for dependabot PRs
- name: Auto merge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.ROBOT_GITHUB_TOKEN }}

- name: Auto approve
run: gh pr review "$PR_URL" -a
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.ROBOT_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: "diff-check"
name: "Build Test"

on: [ push,pull_request ]

jobs:
diff-check:
name: diff-check
build_test:
name: Build Test
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: "1.15"
go-version: "1.16"

- name: Checkout repository
uses: actions/checkout@v2

- name: Format
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Build
run: make build

Expand Down
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/gofmt.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Unit Test"

on: [push,pull_request]
on: [ push,pull_request ]

jobs:
unit_test:
Expand All @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
go: [ "1.15", "1.16" ]
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ ubuntu-latest, windows-latest, macos-latest ]

steps:
- name: Set up Go 1.x
Expand Down

0 comments on commit f49a4e8

Please sign in to comment.