Skip to content

Commit

Permalink
feat: add timeout params for test
Browse files Browse the repository at this point in the history
  • Loading branch information
zl03jsj committed Sep 26, 2022
1 parent 93f8066 commit 1194d3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/common_build_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
- name: upload ftp
id: uploadftp
if: ${{ steps.vars.outputs.ftp_exists == '1' }}
continue-on-error: true
run: |
ncftpput -m -R -v -u ${{secrets.FTP_USER}} -p ${{secrets.FTP_PWD}} ${{secrets.FTP_HOST}} ./${{steps.vars.outputs.repo_name}} ./${{steps.vars.outputs.artifact_name}}
echo "upload file: ${{steps.vars.outputs.artifact_name}} successfully!"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/common_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:

workflow_call:
inputs:
test_timeout:
description: 'specifies the amount of minutes for test timeout'
required: false
default: 10
type: number
has_ffi:
type: boolean

Expand Down Expand Up @@ -51,7 +56,7 @@ jobs:
test -z "$(git status --porcelain)"
- name: Run coverage
run: go test -coverpkg=./... -race -coverprofile=coverage.txt -covermode=atomic ./...
run: go test -coverpkg=./... -race -coverprofile=coverage.txt -covermode=atomic ./... -v --timeout ${{ inputs.test_timeout }}m

- name: Upload
uses: codecov/codecov-action@v2
Expand Down

0 comments on commit 1194d3a

Please sign in to comment.