|
| 1 | +name: "test-ubuntu" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ test*, "*.*.*" ] |
| 6 | + pull_request: |
| 7 | + branches: [ test*, "*.*.*" ] |
| 8 | +jobs: |
| 9 | + # job 1 |
| 10 | + test: |
| 11 | + name: "test" |
| 12 | + services: |
| 13 | + redis: |
| 14 | + image: redis:7.2 |
| 15 | + ports: |
| 16 | + - 6379:6379 |
| 17 | + options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 |
| 18 | + nacos: |
| 19 | + image: nacos/nacos-server:v2.4.2 |
| 20 | + ports: |
| 21 | + - 8848:8848 |
| 22 | + env: |
| 23 | + MODE: standalone |
| 24 | + SPRING_SECURITY_ENABLED: false |
| 25 | + options: --health-cmd="curl -f http://localhost:8848/nacos" --health-interval=10s --health-timeout=5s --health-retries=3 --health-start-period=30s |
| 26 | + runs-on: "${{ matrix.os }}-latest" |
| 27 | + strategy: |
| 28 | + max-parallel: 3 |
| 29 | + fail-fast: false |
| 30 | + matrix: |
| 31 | + java: [ 8, 11, 17, 21 ] |
| 32 | + os: [ |
| 33 | + ubuntu, |
| 34 | + ] |
| 35 | + springboot: [ |
| 36 | + 2.7.18 -D spring-framework.version=5.3.31, |
| 37 | + 2.6.15 -D spring-framework.version=5.3.27, |
| 38 | + 2.5.15 -D spring-framework.version=5.3.27, |
| 39 | + 2.4.13 -D spring-framework.version=5.3.13, |
| 40 | + 2.3.12.RELEASE -D spring-framework.version=5.2.15.RELEASE, |
| 41 | + 2.2.13.RELEASE -D spring-framework.version=5.2.12.RELEASE, |
| 42 | + #2.1.18.RELEASE, |
| 43 | + #2.0.9.RELEASE, |
| 44 | + ] |
| 45 | + steps: |
| 46 | + # step 1 |
| 47 | + - name: "Checkout" |
| 48 | + uses: actions/checkout@v3 |
| 49 | + # step 2 |
| 50 | + - name: "Use Python 3.x" |
| 51 | + uses: actions/setup-python@v2 |
| 52 | + with: |
| 53 | + python-version: '3.12' |
| 54 | + # step 3 |
| 55 | + - name: "Set up Java JDK" |
| 56 | + |
| 57 | + with: |
| 58 | + distribution: 'zulu' |
| 59 | + java-version: ${{ matrix.java }} |
| 60 | + # step 4 |
| 61 | + ## step 4.1: for Ubuntu and MacOS |
| 62 | + - name: "Test with Maven on '${{ matrix.os }}' OS" |
| 63 | + run: | |
| 64 | + ./mvnw -T 4C clean test -P args-for-client-test -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; |
| 65 | +
|
| 66 | + # job 2 |
| 67 | + test-springboot3x: |
| 68 | + name: "test-springboot3.x" |
| 69 | + services: |
| 70 | + redis: |
| 71 | + image: redis:7.2 |
| 72 | + ports: |
| 73 | + - 6379:6379 |
| 74 | + options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 |
| 75 | + nacos: |
| 76 | + image: nacos/nacos-server:v2.4.2 |
| 77 | + ports: |
| 78 | + - 8848:8848 |
| 79 | + env: |
| 80 | + MODE: standalone |
| 81 | + SPRING_SECURITY_ENABLED: false |
| 82 | + options: --health-cmd="curl -f http://localhost:8848/nacos" --health-interval=10s --health-timeout=5s --health-retries=3 --health-start-period=30s |
| 83 | + runs-on: "${{ matrix.os }}-latest" |
| 84 | + strategy: |
| 85 | + max-parallel: 3 |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + java: [ 17, 21 ] |
| 89 | + os: [ |
| 90 | + ubuntu, |
| 91 | + ] |
| 92 | + springboot: [ |
| 93 | + 3.2.0 -D spring-framework.version=6.1.1, |
| 94 | + 3.1.6 -D spring-framework.version=6.0.14, |
| 95 | + 3.0.13 -D spring-framework.version=6.0.14, |
| 96 | + ] |
| 97 | + steps: |
| 98 | + # step 1 |
| 99 | + - name: "Checkout" |
| 100 | + uses: actions/checkout@v3 |
| 101 | + # step 2 |
| 102 | + - name: "Use Python 3.x" |
| 103 | + uses: actions/setup-python@v2 |
| 104 | + with: |
| 105 | + python-version: '3.12' |
| 106 | + # step 3 |
| 107 | + - name: "Set up Java JDK" |
| 108 | + |
| 109 | + with: |
| 110 | + distribution: 'zulu' |
| 111 | + java-version: ${{ matrix.java }} |
| 112 | + # step 4 |
| 113 | + ## step 4.1: for Ubuntu and MacOS |
| 114 | + - name: "Test with Maven on '${{ matrix.os }}' OS" |
| 115 | + if: matrix.os != 'windows' |
| 116 | + run: | |
| 117 | + ./mvnw -T 4C clean test -P args-for-client-test -Dspring-boot.version=${{ matrix.springboot }} -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; |
| 118 | + ## step 4.2: for Windows |
| 119 | + - name: "Build with Maven on 'windows' OS (Skip tests)" |
| 120 | + if: matrix.os == 'windows' |
| 121 | + run: | # Skip tests, because too many errors in unit-test. |
| 122 | + ./mvnw.cmd -version; |
| 123 | + ./mvnw.cmd clean install -P args-for-client-test -DskipTests -D spring-boot.version=${{ matrix.springboot }} -e -B -D org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; |
| 124 | +
|
| 125 | + # job 3 |
| 126 | + test-arm64: |
| 127 | + name: "test-arm64" |
| 128 | + runs-on: ubuntu-latest |
| 129 | + strategy: |
| 130 | + fail-fast: false |
| 131 | + matrix: |
| 132 | + springboot: [ |
| 133 | + #2.7.18 -Dspring-framework.version=5.3.31, # The maven-compiler-plugin will throw an error for an unknown reason. |
| 134 | + #2.6.15 -Dspring-framework.version=5.3.27, # The maven-compiler-plugin will throw an error for an unknown reason. |
| 135 | + #2.5.15 -Dspring-framework.version=5.3.27, # The maven-compiler-plugin will throw an error for an unknown reason. |
| 136 | + 2.4.13 -Dspring-framework.version=5.3.13, |
| 137 | + 2.3.12.RELEASE -Dspring-framework.version=5.2.15.RELEASE, |
| 138 | + 2.2.13.RELEASE -Dspring-framework.version=5.2.12.RELEASE, |
| 139 | + #2.1.18.RELEASE, |
| 140 | + #2.0.9.RELEASE, |
| 141 | + ] |
| 142 | + steps: |
| 143 | + # step 1 |
| 144 | + - name: "Checkout" |
| 145 | + uses: actions/checkout@v3 |
| 146 | + # step 2 |
| 147 | + - name: "Set up QEMU" |
| 148 | + id: qemu |
| 149 | + uses: docker/setup-qemu-action@v3 |
| 150 | + # step 3 |
| 151 | + - name: "Build with Maven on 'arm64v8/ubuntu:20.04' OS (Skip tests)" |
| 152 | + run: | |
| 153 | + docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ |
| 154 | + arm64v8/ubuntu:20.04 \ |
| 155 | + bash -exc 'apt-get update -y && \ |
| 156 | + apt-get install maven -y && \ |
| 157 | + apt-get install -y python3 python3-pip python3-distutils && \ |
| 158 | + apt-get install -y build-essential && \ |
| 159 | + mvn -version && \ |
| 160 | + mvn -T 4C clean install \ |
| 161 | + -Dspring-boot.version=${{ matrix.springboot }} \ |
| 162 | + -Prelease-seata \ |
| 163 | + -DskipTests \ |
| 164 | + -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' |
0 commit comments