|
| 1 | +name: LaunchQL tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + setup: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + container: pyramation/node-sqitch:20.12.0 |
| 10 | + |
| 11 | + env: |
| 12 | + PGHOST: pg_db |
| 13 | + PGPORT: 5432 |
| 14 | + PGUSER: postgres |
| 15 | + PGPASSWORD: password |
| 16 | + |
| 17 | + services: |
| 18 | + pg_db: |
| 19 | + image: pyramation/pgvector:13.3-alpine |
| 20 | + env: |
| 21 | + POSTGRES_USER: postgres |
| 22 | + POSTGRES_PASSWORD: password |
| 23 | + options: >- |
| 24 | + --health-cmd pg_isready |
| 25 | + --health-interval 10s |
| 26 | + --health-timeout 5s |
| 27 | + --health-retries 5 |
| 28 | + ports: |
| 29 | + - 5432:5432 |
| 30 | + |
| 31 | + minio_cdn: |
| 32 | + image: minio/minio:edge-cicd |
| 33 | + env: |
| 34 | + MINIO_ROOT_USER: minioadmin |
| 35 | + MINIO_ROOT_PASSWORD: minioadmin |
| 36 | + ports: |
| 37 | + - 9000:9000 |
| 38 | + - 9001:9001 |
| 39 | + options: >- |
| 40 | + --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" |
| 41 | + --health-interval 10s |
| 42 | + --health-timeout 5s |
| 43 | + --health-retries 5 |
| 44 | +
|
| 45 | + steps: |
| 46 | + - name: Configure Git (for tests) |
| 47 | + run: | |
| 48 | + git config --global user.name "CI Test User" |
| 49 | + git config --global user.email "[email protected]" |
| 50 | +
|
| 51 | + - name: Checkout |
| 52 | + uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - name: Enable corepack and pnpm |
| 55 | + run: | |
| 56 | + corepack enable |
| 57 | + corepack prepare pnpm@9 --activate |
| 58 | + pnpm -v |
| 59 | + node -v |
| 60 | +
|
| 61 | + - name: Install |
| 62 | + run: pnpm install |
| 63 | + |
| 64 | + - name: Install LaunchQL CLI globally |
| 65 | + run: npm install -g @launchql/[email protected] |
| 66 | + |
| 67 | + - name: Build |
| 68 | + run: pnpm -r build |
| 69 | + |
| 70 | + - name: Seed app_user |
| 71 | + run: | |
| 72 | + lql admin-users bootstrap --yes |
| 73 | + lql admin-users add --test --yes |
| 74 | + env: |
| 75 | + PGHOST: pg_db |
| 76 | + PGPORT: 5432 |
| 77 | + PGUSER: postgres |
| 78 | + PGPASSWORD: password |
| 79 | + |
| 80 | + test: |
| 81 | + needs: setup |
| 82 | + runs-on: ubuntu-latest |
| 83 | + container: pyramation/node-sqitch:20.12.0 |
| 84 | + continue-on-error: true |
| 85 | + strategy: |
| 86 | + fail-fast: false |
| 87 | + matrix: |
| 88 | + package: |
| 89 | + - utils/verify |
| 90 | + - utils/utils |
| 91 | + - utils/inflection |
| 92 | + - utils/faker |
| 93 | + - utils/base32 |
| 94 | + - security/totp |
| 95 | + - security/jwt-claims |
| 96 | + - security/encrypted-secrets-table |
| 97 | + - security/encrypted-secrets |
| 98 | + - security/defaults |
| 99 | + - security/default-roles |
| 100 | + - metrics/measurements |
| 101 | + - metrics/achievements |
| 102 | + - meta/db_meta_test |
| 103 | + - meta/db_meta_modules |
| 104 | + - meta/db_meta |
| 105 | + - jobs/jobs |
| 106 | + - jobs/database-jobs |
| 107 | + - data-types/uuid |
| 108 | + - data-types/types |
| 109 | + - data-types/stamps |
| 110 | + - data-types/geotypes |
| 111 | + |
| 112 | + env: |
| 113 | + PGHOST: pg_db |
| 114 | + PGPORT: 5432 |
| 115 | + PGUSER: postgres |
| 116 | + PGPASSWORD: password |
| 117 | + |
| 118 | + services: |
| 119 | + pg_db: |
| 120 | + image: pyramation/pgvector:13.3-alpine |
| 121 | + env: |
| 122 | + POSTGRES_USER: postgres |
| 123 | + POSTGRES_PASSWORD: password |
| 124 | + options: >- |
| 125 | + --health-cmd pg_isready |
| 126 | + --health-interval 10s |
| 127 | + --health-timeout 5s |
| 128 | + --health-retries 5 |
| 129 | + ports: |
| 130 | + - 5432:5432 |
| 131 | + |
| 132 | + minio_cdn: |
| 133 | + image: minio/minio:edge-cicd |
| 134 | + env: |
| 135 | + MINIO_ROOT_USER: minioadmin |
| 136 | + MINIO_ROOT_PASSWORD: minioadmin |
| 137 | + ports: |
| 138 | + - 9000:9000 |
| 139 | + - 9001:9001 |
| 140 | + options: >- |
| 141 | + --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" |
| 142 | + --health-interval 10s |
| 143 | + --health-timeout 5s |
| 144 | + --health-retries 5 |
| 145 | +
|
| 146 | + steps: |
| 147 | + - name: Configure Git (for tests) |
| 148 | + run: | |
| 149 | + git config --global user.name "CI Test User" |
| 150 | + git config --global user.email "[email protected]" |
| 151 | +
|
| 152 | + - name: Checkout |
| 153 | + uses: actions/checkout@v4 |
| 154 | + |
| 155 | + - name: Enable corepack and pnpm |
| 156 | + run: | |
| 157 | + corepack enable |
| 158 | + corepack prepare pnpm@9 --activate |
| 159 | + pnpm -v |
| 160 | + node -v |
| 161 | +
|
| 162 | + - name: Install |
| 163 | + run: pnpm install |
| 164 | + |
| 165 | + - name: Install LaunchQL CLI globally |
| 166 | + run: npm install -g @launchql/[email protected] |
| 167 | + |
| 168 | + - name: Build |
| 169 | + run: pnpm -r build |
| 170 | + |
| 171 | + - name: Seed app_user |
| 172 | + run: | |
| 173 | + lql admin-users bootstrap --yes |
| 174 | + lql admin-users add --test --yes |
| 175 | +
|
| 176 | + - name: Test ${{ matrix.package }} |
| 177 | + run: cd ./packages/${{ matrix.package }} && pnpm test |
| 178 | + |
| 179 | + integration-test: |
| 180 | + needs: setup |
| 181 | + runs-on: ubuntu-latest |
| 182 | + container: pyramation/node-sqitch:20.12.0 |
| 183 | + |
| 184 | + env: |
| 185 | + PGHOST: pg_db |
| 186 | + PGPORT: 5432 |
| 187 | + PGUSER: postgres |
| 188 | + PGPASSWORD: password |
| 189 | + |
| 190 | + services: |
| 191 | + pg_db: |
| 192 | + image: pyramation/pgvector:13.3-alpine |
| 193 | + env: |
| 194 | + POSTGRES_USER: postgres |
| 195 | + POSTGRES_PASSWORD: password |
| 196 | + options: >- |
| 197 | + --health-cmd pg_isready |
| 198 | + --health-interval 10s |
| 199 | + --health-timeout 5s |
| 200 | + --health-retries 5 |
| 201 | + ports: |
| 202 | + - 5432:5432 |
| 203 | + |
| 204 | + minio_cdn: |
| 205 | + image: minio/minio:edge-cicd |
| 206 | + env: |
| 207 | + MINIO_ROOT_USER: minioadmin |
| 208 | + MINIO_ROOT_PASSWORD: minioadmin |
| 209 | + ports: |
| 210 | + - 9000:9000 |
| 211 | + - 9001:9001 |
| 212 | + options: >- |
| 213 | + --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" |
| 214 | + --health-interval 10s |
| 215 | + --health-timeout 5s |
| 216 | + --health-retries 5 |
| 217 | +
|
| 218 | + steps: |
| 219 | + - name: Configure Git (for tests) |
| 220 | + run: | |
| 221 | + git config --global user.name "CI Test User" |
| 222 | + git config --global user.email "[email protected]" |
| 223 | +
|
| 224 | + - name: Checkout |
| 225 | + uses: actions/checkout@v4 |
| 226 | + |
| 227 | + - name: Enable corepack and pnpm |
| 228 | + run: | |
| 229 | + corepack enable |
| 230 | + corepack prepare pnpm@9 --activate |
| 231 | + pnpm -v |
| 232 | + node -v |
| 233 | +
|
| 234 | + - name: Install |
| 235 | + run: pnpm install |
| 236 | + |
| 237 | + - name: Install LaunchQL CLI globally |
| 238 | + run: npm install -g @launchql/[email protected] |
| 239 | + |
| 240 | + - name: Build |
| 241 | + run: pnpm -r build |
| 242 | + |
| 243 | + - name: Seed app_user |
| 244 | + run: | |
| 245 | + lql admin-users bootstrap --yes |
| 246 | + lql admin-users add --test --yes |
| 247 | +
|
| 248 | + - name: Run Integration Tests |
| 249 | + run: ./scripts/test-all-packages.sh |
| 250 | + |
0 commit comments