Skip to content

Commit

Permalink
ci: optimized run env and remove unused ci (cloudwego#1559)
Browse files Browse the repository at this point in the history
* unit-scenario-test uses self-hosted
- kitex-tests runs much faster in self-hosted env with local cache
* compliant check runs on Github hosted server to make it simple
* removed staticcheck which is duplicated with golangci-lint
* removed release-check.yml, it's bugy and didn't work as expected.
  • Loading branch information
xiaost authored Sep 25, 2024
1 parent e4c70c1 commit ff5c245
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 55 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: [ pull_request ]

jobs:
compliant:
runs-on: [ self-hosted, X64 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check License Header
uses: apache/skywalking-eyes/header@v0.4.0
Expand All @@ -16,32 +16,7 @@ jobs:
- name: Check Spell
uses: crate-ci/typos@v1.13.14

staticcheck:
runs-on: [ self-hosted, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
# For self-hosted, the cache path is shared across projects
# and it works well without the cache of github actions
# Enable it if we're going to use Github only
cache: false

- uses: reviewdog/action-staticcheck@v1
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Report all results.
filter_mode: nofilter
# Exit with 1 when it finds at least one finding.
fail_on_error: true
# Set staticcheck flags
staticcheck_flags: -checks=inherit,-SA1029

lint:
golangci-lint:
runs-on: [ self-hosted, X64 ]
steps:
- uses: actions/checkout@v4
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/release-check.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ on: [ push, pull_request ]

jobs:
unit-scenario-test:
runs-on: ubuntu-latest
runs-on: [ self-hosted, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: stable
cache: false
- name: Scenario Tests
run: |
cd ..
Expand Down Expand Up @@ -79,6 +80,9 @@ jobs:
windows-test:
runs-on: windows-latest
env: # Fixes https://github.com/actions/setup-go/issues/240
GOMODCACHE: 'D:\go\pkg\mod'
GOCACHE: 'D:\go\go-build'
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand Down

0 comments on commit ff5c245

Please sign in to comment.