|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + unit: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + node-version: [10.x, 12.x, 14.x] |
| 12 | + fail-fast: false |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v2 |
| 17 | + - name: Use Node.js ${{ matrix.node-version }} |
| 18 | + uses: actions/setup-node@v1 |
| 19 | + with: |
| 20 | + node-version: ${{ matrix.node-version }} |
| 21 | + - name: Get yarn cache directory path |
| 22 | + id: yarn-cache-dir-path |
| 23 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 24 | + - uses: actions/cache@v2 |
| 25 | + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 26 | + with: |
| 27 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 28 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 29 | + restore-keys: | |
| 30 | + ${{ runner.os }}-yarn- |
| 31 | + - name: Restore lerna |
| 32 | + uses: actions/cache@v2 |
| 33 | + with: |
| 34 | + # npm cache files are stored in `~/.npm` on Linux/macOS |
| 35 | + path: | |
| 36 | + ~/.npm |
| 37 | + node_modules |
| 38 | + */*/node_modules |
| 39 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 40 | + - name: Yarn install |
| 41 | + |
| 42 | + with: |
| 43 | + cmd: install |
| 44 | + - name: Lerna bootstrap |
| 45 | + run: yarn lerna bootstrap --ignore @cubejs-backend/jdbc-driver |
| 46 | + - name: Lerna tsc |
| 47 | + run: yarn lerna run --concurrency 1 tsc |
| 48 | + - name: Lerna test |
| 49 | + run: yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver unit |
| 50 | + |
| 51 | + integration-wrk-1: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + |
| 54 | + services: |
| 55 | + redis: |
| 56 | + image: redis |
| 57 | + options: >- |
| 58 | + --health-cmd "redis-cli ping" |
| 59 | + --health-interval 10s |
| 60 | + --health-timeout 5s |
| 61 | + --health-retries 5 |
| 62 | +
|
| 63 | + strategy: |
| 64 | + matrix: |
| 65 | + node-version: [10.x] |
| 66 | + fail-fast: false |
| 67 | + |
| 68 | + steps: |
| 69 | + - name: Checkout |
| 70 | + uses: actions/checkout@v2 |
| 71 | + - name: Use Node.js ${{ matrix.node-version }} |
| 72 | + uses: actions/setup-node@v1 |
| 73 | + with: |
| 74 | + node-version: ${{ matrix.node-version }} |
| 75 | + - name: Get yarn cache directory path |
| 76 | + id: yarn-cache-dir-path |
| 77 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 78 | + - uses: actions/cache@v2 |
| 79 | + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 80 | + with: |
| 81 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 82 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 83 | + restore-keys: | |
| 84 | + ${{ runner.os }}-yarn- |
| 85 | + - name: Restore lerna |
| 86 | + uses: actions/cache@v2 |
| 87 | + with: |
| 88 | + # npm cache files are stored in `~/.npm` on Linux/macOS |
| 89 | + path: | |
| 90 | + ~/.npm |
| 91 | + node_modules |
| 92 | + */*/node_modules |
| 93 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 94 | + - name: Yarn install |
| 95 | + |
| 96 | + with: |
| 97 | + cmd: install |
| 98 | + - name: Lerna bootstrap |
| 99 | + run: yarn lerna bootstrap --ignore @cubejs-backend/jdbc-driver |
| 100 | + - name: Lerna tsc |
| 101 | + run: yarn lerna run --concurrency 1 tsc |
| 102 | + - name: Run Postgres Integration with 9.6 |
| 103 | + run: | |
| 104 | + docker pull postgres:${TEST_PGSQL_VERSION} |
| 105 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:postgres |
| 106 | + env: |
| 107 | + TEST_PGSQL_VERSION: 9.6 |
| 108 | + - name: Run Postgres Integration with 10 |
| 109 | + run: | |
| 110 | + docker pull postgres:${TEST_PGSQL_VERSION} |
| 111 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:postgres |
| 112 | + env: |
| 113 | + TEST_PGSQL_VERSION: 10 |
| 114 | + - name: Run Postgres Integration with 11 |
| 115 | + run: | |
| 116 | + docker pull postgres:${TEST_PGSQL_VERSION} |
| 117 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:postgres |
| 118 | + env: |
| 119 | + TEST_PGSQL_VERSION: 11 |
| 120 | + - name: Run Postgres Integration with 12 |
| 121 | + run: | |
| 122 | + docker pull postgres:${TEST_PGSQL_VERSION} |
| 123 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:postgres |
| 124 | + env: |
| 125 | + TEST_PGSQL_VERSION: 12 |
| 126 | + - name: Run MS SQL Integration with 2017-latest |
| 127 | + run: | |
| 128 | + docker pull mcr.microsoft.com/mssql/server:${TEST_MSSQL_VERSION} |
| 129 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:mssql |
| 130 | + env: |
| 131 | + TEST_MSSQL_VERSION: 2017-latest |
| 132 | + - name: Run MS SQL Integration with 2019-latest |
| 133 | + run: | |
| 134 | + docker pull mcr.microsoft.com/mssql/server:${TEST_MSSQL_VERSION} |
| 135 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:mssql |
| 136 | + env: |
| 137 | + TEST_MSSQL_VERSION: 2019-latest |
| 138 | + |
| 139 | + integration-wrk-2: |
| 140 | + runs-on: ubuntu-latest |
| 141 | + |
| 142 | + services: |
| 143 | + redis: |
| 144 | + image: redis |
| 145 | + options: >- |
| 146 | + --health-cmd "redis-cli ping" |
| 147 | + --health-interval 10s |
| 148 | + --health-timeout 5s |
| 149 | + --health-retries 5 |
| 150 | +
|
| 151 | + strategy: |
| 152 | + matrix: |
| 153 | + node-version: [10.x] |
| 154 | + fail-fast: false |
| 155 | + |
| 156 | + steps: |
| 157 | + - name: Checkout |
| 158 | + uses: actions/checkout@v2 |
| 159 | + - name: Use Node.js ${{ matrix.node-version }} |
| 160 | + uses: actions/setup-node@v1 |
| 161 | + with: |
| 162 | + node-version: ${{ matrix.node-version }} |
| 163 | + - name: Get yarn cache directory path |
| 164 | + id: yarn-cache-dir-path |
| 165 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 166 | + - uses: actions/cache@v2 |
| 167 | + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 168 | + with: |
| 169 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 170 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 171 | + restore-keys: | |
| 172 | + ${{ runner.os }}-yarn- |
| 173 | + - name: Restore lerna |
| 174 | + uses: actions/cache@v2 |
| 175 | + with: |
| 176 | + # npm cache files are stored in `~/.npm` on Linux/macOS |
| 177 | + path: | |
| 178 | + ~/.npm |
| 179 | + node_modules |
| 180 | + */*/node_modules |
| 181 | + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} |
| 182 | + - name: Yarn install |
| 183 | + |
| 184 | + with: |
| 185 | + cmd: install |
| 186 | + - name: Lerna bootstrap |
| 187 | + run: yarn lerna bootstrap --ignore @cubejs-backend/jdbc-driver |
| 188 | + - name: Lerna tsc |
| 189 | + run: yarn lerna run --concurrency 1 tsc |
| 190 | + - name: Run MySQL Integration with 5.6 |
| 191 | + run: | |
| 192 | + docker pull mysql:${TEST_MYSQL_VERSION} |
| 193 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:mysql |
| 194 | + env: |
| 195 | + TEST_MYSQL_VERSION: 5.6 |
| 196 | + - name: Run MySQL Integration with 5.7 |
| 197 | + run: | |
| 198 | + docker pull mysql:${TEST_MYSQL_VERSION} |
| 199 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:mysql |
| 200 | + env: |
| 201 | + TEST_MYSQL_VERSION: 5.7 |
| 202 | + - name: Run Clickhouse Integration with 20.6 |
| 203 | + run: | |
| 204 | + docker pull yandex/clickhouse-server:${TEST_CLICKHOUSE_VERSION} |
| 205 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:clickhouse |
| 206 | + env: |
| 207 | + TEST_CLICKHOUSE_VERSION: 20.6 |
| 208 | + - name: Run Clickhouse Integration with 20 |
| 209 | + run: | |
| 210 | + docker pull yandex/clickhouse-server:${TEST_CLICKHOUSE_VERSION} |
| 211 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:clickhouse |
| 212 | + env: |
| 213 | + TEST_CLICKHOUSE_VERSION: 20 |
| 214 | + - name: Run Clickhouse Integration with 19 |
| 215 | + run: | |
| 216 | + docker pull yandex/clickhouse-server:${TEST_CLICKHOUSE_VERSION} |
| 217 | + yarn lerna run --concurrency 1 --ignore @cubejs-backend/jdbc-driver integration:clickhouse |
| 218 | + env: |
| 219 | + TEST_CLICKHOUSE_VERSION: 19 |
0 commit comments