Skip to content

Commit

Permalink
CI: set timeout for github actions (#4241)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 authored Dec 9, 2023
1 parent 69de99e commit 1dd17de
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/command/quota.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test_total_inodes(){
sleep $((HEARTBEAT_INTERVAL+1))
set +x
for i in {1001..2000}; do
echo $i | tee /jfs/test$i > /dev/null || (echo "df -i /jfs" && exit 1)
echo $i | tee /jfs/test$i > /dev/null || (df -i /jfs && ls /jfs/ -l | wc-l && exit 1)
done
set -x
sleep $VOLUME_QUOTA_FLUSH_INTERVAL
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/command/sync_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ check_sync_log(){
[ -z "$count3" ] && count3=0
count1=$((file_count - count2 - count3))
echo "count1, $count1, count2, $count2, count3, $count3"
min_count=$((file_count / 10))
min_count=$((file_count / 20))
# check if count1 is less than min_count
if [ "$count1" -lt "$min_count" ] || [ "$count2" -lt "$min_count" ] || [ "$count3" -lt "$min_count" ]; then
echo "count is less than min_count, $count1, $count2, $count3, $min_count"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/aitests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:

jobs:
aitests:
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
Expand All @@ -31,7 +32,8 @@ jobs:
with:
fetch-depth: 1

- name: Build
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Run Redis
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:

jobs:
chaos-test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -37,7 +38,8 @@ jobs:
go-version: 'oldstable'
cache: true

- name: Build
- name: Build
timeout-minutes: 10
run: |
sudo .github/scripts/apt_install.sh musl-tools upx-ucl
export STATIC=1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
jobs:
analyze:
name: Analyze
timeout-minutes: 30
runs-on: ubuntu-20.04
permissions:
actions: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
meta_matrix: ${{ steps.set-matrix.outputs.meta_matrix }}

command_test1:
timeout-minutes: 60
needs: [build-matrix]
strategy:
fail-fast: true
Expand All @@ -72,6 +73,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Test Config
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/elastictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:

jobs:
elastictest:
timeout-minutes: 60
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand All @@ -33,6 +34,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Run Redis
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/encoding_mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
mysql-encoding-test:
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand All @@ -36,6 +37,7 @@ jobs:
mv juicefs juicefs_old
- name: Build new linux target
timeout-minutes: 10
uses: ./.github/actions/build

- name: Init
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/filebench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Run Redis
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fio_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
fio_benchmark:
timeout-minutes: 30
if: github.repository == 'juicedata/juicefs'
runs-on: [ubuntu-20.04]

Expand All @@ -38,6 +39,7 @@ jobs:
cache: true

- name: Build linux target
timeout-minutes: 10
run: |
make juicefs
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fsrand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
fsrand:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -41,6 +42,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fsrand2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
default: false
jobs:
fsrand2:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -49,6 +50,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:

jobs:
gateway:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -82,6 +83,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Copy
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/load.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
meta_matrix: ${{ steps.set-matrix.outputs.meta_matrix }}

load:
timeout-minutes: 30
if: github.repository == 'juicedata/juicefs'
needs: [build-matrix]
strategy:
Expand Down Expand Up @@ -79,6 +80,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ltpfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
ltpfs:
timeout-minutes: 60
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand All @@ -26,6 +27,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Copy
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ltpsyscalls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:

jobs:
ltpsyscalls:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -48,6 +49,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- cron: '0 0 * * *'
jobs:
misc-test:
timeout-minutes: 60
runs-on: ubuntu-20.04
services:
redis:
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
minio/minio server /data
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Install tool
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mongodb_mmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:

jobs:
mongodb_mmap:
timeout-minutes: 60
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand All @@ -33,6 +34,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Run Redis
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mutate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

mutate-test:
timeout-minutes: 120
if: "!github.event.pull_request.draft"
name: ${{matrix.test_file}}
needs: build-matrix
Expand All @@ -126,6 +127,7 @@ jobs:
job_name: ${{matrix.test_file}}

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Remove problem matcher for go
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mysqltest_bigtable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
mysqltest:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -30,6 +31,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Run Redis
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/permission-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:

jobs:
pjdfstest:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand All @@ -48,7 +49,9 @@ jobs:
- name: Set Variable
id: vars
run: echo "target=juicefs" >> $GITHUB_OUTPUT

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/redis_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
rediscompile:
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand All @@ -26,6 +27,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Setup minio
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rmfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
rmr-test:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand All @@ -36,6 +37,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sdktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Set up Java
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:

jobs:
storage:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: "$TARGET"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sysbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
sysbench:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:
fi
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tpcds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
fetch-depth: 1

- name: Build
timeout-minutes: 10
uses: ./.github/actions/build

- name: Cache local Maven repository
Expand Down
Loading

0 comments on commit 1dd17de

Please sign in to comment.