ci: add test skip case (#922)
Signed-off-by: Long Dai <long0dai@foxmail.com> Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
This commit is contained in:
parent
0777a6a943
commit
264005d531
|
@ -43,24 +43,32 @@ jobs:
|
|||
- os: macOS-latest
|
||||
target_arch: arm
|
||||
steps:
|
||||
- name: Check if need skip
|
||||
id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v3.4.0
|
||||
with:
|
||||
cancel_others: 'true'
|
||||
paths_ignore: '["**.md", ".codecov.yaml", ".github/workflows/dapr-automerge.yml"]'
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Check out code into the Go module directory
|
||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||
uses: actions/checkout@v2
|
||||
- name: Run golangci-lint
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' && steps.skip_check.outputs.should_skip != 'true'
|
||||
uses: golangci/golangci-lint-action@v2.2.1
|
||||
with:
|
||||
version: ${{ env.GOLANGCI_LINT_VER }}
|
||||
- name: Run go mod tidy check diff
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' && steps.skip_check.outputs.should_skip != 'true'
|
||||
run: make modtidy check-diff
|
||||
- name: Run make test
|
||||
env:
|
||||
COVERAGE_OPTS: "-coverprofile=coverage.txt -covermode=atomic"
|
||||
if: matrix.target_arch != 'arm'
|
||||
if: matrix.target_arch != 'arm' && steps.skip_check.outputs.should_skip != 'true'
|
||||
run: make test
|
||||
- name: Codecov
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
|
||||
|
|
|
@ -15,11 +15,24 @@ on:
|
|||
- release-*
|
||||
|
||||
jobs:
|
||||
pre_job:
|
||||
name: Skip Duplicate Actions
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||
steps:
|
||||
- id: skip_check
|
||||
uses: fkirc/skip-duplicate-actions@v3.4.0
|
||||
with:
|
||||
cancel_others: 'true'
|
||||
paths_ignore: '["**.md", ".codecov.yaml", ".github/workflows/dapr-automerge.yml"]'
|
||||
# Based on whether this is a PR or a scheduled run, we will run a different
|
||||
# subset of the conformance tests. This allows all the tests not requiring
|
||||
# secrets to be executed on pull requests.
|
||||
generate-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
needs: pre_job
|
||||
if: needs.pre_job.outputs.should_skip != 'true'
|
||||
steps:
|
||||
- name: Install yq
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue