Skip to content

Commit

Permalink
[CI] Refactor integration test scenario jobs to dependent jobs (apach…
Browse files Browse the repository at this point in the history
…e#14871)

* Refactor integration test scenario jobs to dependent jobs

* Simplify integration test job name
  • Loading branch information
sandynz authored Jan 19, 2022
1 parent 225aa62 commit 5b44f79
Showing 1 changed file with 86 additions and 4 deletions.
90 changes: 86 additions & 4 deletions .github/workflows/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,99 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3

jobs:
integration-test-docker:
name: Integration Test in Docker
it-empty-rule:
name: IT empty rule
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
env: [ docker ]
adapter: [ proxy, jdbc ]
database: [ MySQL, PostgreSQL ]
scenario: [ db,tbl,dbtbl_with_readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting_and_encrypt,readwrite_splitting,empty_rules ]
scenario: [ empty_rules ]
exclude:
- adapter: jdbc
database: PostgreSQL
- adapter: proxy
database: PostgreSQL
scenario: tbl
- adapter: proxy
database: PostgreSQL
scenario: empty_rules
steps:
- name: Cache Maven Repos
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: set environment
run: export MAVEN_OPTS=' -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true ${MAVEN_OPTS}'
- name: Build Project
run: ./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite -Pit.env.docker -DskipTests
- name: Run Integration Test
run: ./mvnw -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/pom.xml -Dit.adapters=${{ matrix.adapter }} -Dit.databases=${{ matrix.database }} -Dit.scenarios=${{ matrix.scenario }} -Dit.env.type=DOCKER

it-single-rule:
name: IT single rule
needs: it-empty-rule
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
env: [ docker ]
adapter: [ proxy, jdbc ]
database: [ MySQL, PostgreSQL ]
scenario: [ db, tbl, encrypt, readwrite_splitting ]
exclude:
- adapter: jdbc
database: PostgreSQL
- adapter: proxy
database: PostgreSQL
scenario: tbl
- adapter: proxy
database: PostgreSQL
scenario: empty_rules
steps:
- name: Cache Maven Repos
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: set environment
run: export MAVEN_OPTS=' -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true ${MAVEN_OPTS}'
- name: Build Project
run: ./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite -Pit.env.docker -DskipTests
- name: Run Integration Test
run: ./mvnw -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/pom.xml -Dit.adapters=${{ matrix.adapter }} -Dit.databases=${{ matrix.database }} -Dit.scenarios=${{ matrix.scenario }} -Dit.env.type=DOCKER

it-mixture-rule:
name: IT mixture rule
needs: [ it-empty-rule, it-single-rule ]
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
env: [ docker ]
adapter: [ proxy, jdbc ]
database: [ MySQL, PostgreSQL ]
scenario: [ dbtbl_with_readwrite_splitting, dbtbl_with_readwrite_splitting_and_encrypt ]
exclude:
- adapter: jdbc
database: PostgreSQL
Expand Down

0 comments on commit 5b44f79

Please sign in to comment.