Skip to content

Commit

Permalink
fix github action ci not trigger on release branch
Browse files Browse the repository at this point in the history
Change-Id: I4e8873be93197e3024deb0acf61cab4ded868a69
  • Loading branch information
javeme committed Dec 29, 2021
1 parent 08bb09e commit 625af71
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ on:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- 'release-*'
- 'test-*'
pull_request:
branches:
- master
- /^release-.*$/
- /^test-.*$/
- 'release-*'
- 'test-*'

jobs:
build:
runs-on: ubuntu-20.04
env:
TRAVIS_DIR: hugegraph-dist/src/assembly/travis
RELEASE_BRANCH: ${{ github.ref_name == 'release-*' || github.ref_name == 'test-*' }}

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -50,8 +52,9 @@ jobs:
run: |
$TRAVIS_DIR/install-backend.sh ${{ matrix.BACKEND }}
- name: Init Mysql Env
- name: Init MySQL Env
uses: mirromutth/[email protected]
if: ${{ matrix.BACKEND == 'mysql' }}
with:
host port: 3306 # Optional, default value is 3306. The port of host
container port: 3306 # Optional, default value is 3306. The port of container
Expand All @@ -65,10 +68,15 @@ jobs:

- name: Run test
run: |
mvn test -P core-test,${{ matrix.BACKEND }}
$TRAVIS_DIR/run-core-test.sh ${{ matrix.BACKEND }}
$TRAVIS_DIR/run-api-test.sh ${{ matrix.BACKEND }}
$TRAVIS_DIR/run-unit-test.sh ${{ matrix.BACKEND }}
- name: Run TinkerPop test
if: ${{ env.RELEASE_BRANCH == 'true' }}
run: |
$TRAVIS_DIR/run-tinkerpop-test.sh ${{ matrix.BACKEND }} tinkerpop
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
7 changes: 7 additions & 0 deletions hugegraph-dist/src/assembly/travis/run-core-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -ev

BACKEND=$1

mvn test -P core-test,$BACKEND
3 changes: 3 additions & 0 deletions hugegraph-dist/src/assembly/travis/run-tinkerpop-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -ev

BACKEND=$1
SUITE=$2

if [[ "$SUITE" == "structure" || "$SUITE" == "tinkerpop" ]]; then
mvn test -P tinkerpop-structure-test,$BACKEND
fi
Expand Down

0 comments on commit 625af71

Please sign in to comment.