Skip to content

Commit

Permalink
CI:reduce travis time (#2278)
Browse files Browse the repository at this point in the history
* reduce travis time
  • Loading branch information
sanwan authored Jun 21, 2022
1 parent 45f9799 commit 95350ea
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integrationtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ jobs:
uses: juicedata/slack-notify-action@main
with:
channel-id: "${{ secrets.SLACK_CHANNEL_ID_FOR_PR_CHECK_NOTIFY }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"

- name: Setup upterm session
if: ${{ failure() }}
uses: lhotari/action-upterm@v1
uses: lhotari/action-upterm@v1
76 changes: 76 additions & 0 deletions .github/workflows/sdktest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: "sdktest"

on:
push:
branches:
- 'main'
- 'release-*'
paths-ignore:
- 'docs/**'
pull_request:
#The branches below must be a subset of the branches above
branches:
- 'main'
- 'release-*'
paths-ignore:
- 'docs/**'
workflow_dispatch:

jobs:
sdktest:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.17.x'

- name: Set up Docker
uses: docker-practice/actions-setup-docker@master



- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Build linux target
run: |
make juicefs
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'


- name: Run Redis
run: |
sudo docker run -d --name redis -v redis-data:/data \
-p 6379:6379 redis redis-server --appendonly yes
- name: Juicefs Format
run: |
sudo ./juicefs format localhost dev
- name: Sdk Test
run: |
make -C sdk/java/libjfs
cd sdk/java
sudo mvn test -B
sudo mvn package -B -Dmaven.test.skip=true --quiet -Dmaven.javadoc.skip=true
- name: Send Slack Notification
if: ${{ failure() }}
uses: juicedata/slack-notify-action@main
with:
channel-id: "${{ secrets.SLACK_CHANNEL_ID_FOR_PR_CHECK_NOTIFY }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"

- name: Setup upterm session
if: ${{ failure() }}
uses: lhotari/action-upterm@v1
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ script:
- cat cov2.out >> coverage.txt
- cd /home/travis/gopath/src/github.com/juicedata/juicefs
- sudo DURATION=10 make -C fstests fsracer
- make -C sdk/java/libjfs
- cd sdk/java
- sudo `which mvn` compile -B --quiet || sudo `which mvn` compile -B --quiet
- sudo `which mvn` test -B
- sudo `which mvn` package -B -Dmaven.test.skip=true --quiet -Dmaven.javadoc.skip=true || sudo `which mvn` package -B -Dmaven.test.skip=true --quiet -Dmaven.javadoc.skip=true
- cd ../../
- sudo ./juicefs umount /jfs || sudo lsof /jfs && sudo ./juicefs umount --force /jfs || true
- sudo ./juicefs gc localhost
- sudo ./juicefs fsck localhost
Expand Down

0 comments on commit 95350ea

Please sign in to comment.