Don't hydrate full images until after we've merged semantic & lexical #7022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Grid CI | |
| on: | |
| workflow_dispatch: # Manual invocation. | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # required by aws-actions/configure-aws-credentials | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:8.18.3 | |
| # Wait for elasticsearch to report healthy before continuing. | |
| # see https://github.com/actions/example-services/blob/master/.github/workflows/postgres-service.yml#L28 | |
| # Version must match the Testcontainers pin in ElasticSearchDockerBase (8.18.3): CI runs the | |
| # tests with USE_DOCKER_FOR_TESTS=false, so they hit this service container instead of spinning | |
| # up their own. The hybrid kNN search syntax requires ES 8.x. Security is disabled here to match | |
| # ElasticSearchDockerBase / dev/elasticsearch/elasticsearch.yml, since CI configures the | |
| # single-node service purely through these flags rather than a mounted config file. | |
| options: -e "discovery.type=single-node" -e "xpack.security.enabled=false" -e "ES_JAVA_OPTS=-Xms1024m -Xmx1024m" --expose 9200 --health-cmd "curl localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10 | |
| ports: | |
| - 9200:9200 | |
| localstack: | |
| image: localstack/localstack:4.5.0 | |
| env: | |
| SERVICES: kinesis,dynamodb | |
| DEFAULT_REGION: eu-west-1 | |
| KINESIS_ERROR_PROBABILITY: 0.0 | |
| ports: | |
| - "127.0.0.1:4566:4566" # LocalStack Gateway | |
| - "127.0.0.1:4510-4559:4510-4559" # external services port range | |
| options: >- | |
| --health-cmd "curl localhost:4566/_localstack/health" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: npm | |
| cache-dependency-path: "cdk/package-lock.json" | |
| - name: Kahuna (client-side) | |
| working-directory: ./kahuna | |
| run: | | |
| npm install-clean | |
| npm run undist | |
| npm test | |
| npm run dist | |
| - name: install image libs needed for tests | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install graphicsmagick | |
| sudo apt-get -y install graphicsmagick-imagemagick-compat | |
| sudo apt-get -y install exiftool | |
| - name: Setup Java | |
| uses: guardian/setup-scala@v1 | |
| - name: SBT | |
| env: | |
| USE_DOCKER_FOR_TESTS: false # i.e. don't initialise the DockerContainer within tests, instead rely on the ones defined in the 'services' section of this file | |
| run: sbt clean compile scripts/compile Test/compile test Debian/packageBin | |
| - name: Image Counter Lambda | |
| working-directory: ./image-counter-lambda | |
| run: | | |
| npm install-clean | |
| npm test | |
| npm run compile | |
| - name: Image Embedder CDK | |
| run: ./scripts/embedder-deploy/cdk.sh | |
| - name: Image Embedder tests | |
| working-directory: ./image-embedder-lambda | |
| run: | | |
| npm install-clean | |
| npm test | |
| - name: Image Embedder bundling | |
| run: ./scripts/embedder-deploy/build.sh | |
| - uses: guardian/actions-riff-raff@v4.3.3 | |
| if: "! github.event.pull_request.head.repo.fork" | |
| with: | |
| githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
| commentingStage: TEST | |
| projectName: media-service::grid::all | |
| buildNumberOffset: 7565 | |
| configPath: riff-raff.yaml | |
| contentDirectories: | | |
| auth: | |
| - auth/target/auth.deb | |
| collections: | |
| - collections/target/collections.deb | |
| cropper: | |
| - cropper/target/cropper.deb | |
| image-loader-projection: | |
| - image-loader/target/image-loader.deb | |
| image-loader: | |
| - image-loader/target/image-loader.deb | |
| kahuna: | |
| - kahuna/target/kahuna.deb | |
| leases: | |
| - leases/target/leases.deb | |
| media-api: | |
| - media-api/target/media-api.deb | |
| metadata-editor: | |
| - metadata-editor/target/metadata-editor.deb | |
| thrall: | |
| - thrall/target/thrall.deb | |
| usage: | |
| - usage/target/usage.deb | |
| image-counter-lambda: | |
| - image-counter-lambda/dist/image-counter-lambda.zip | |
| cdk.out: | |
| - cdk/cdk.out | |
| image-embedder-lambda: | |
| - image-embedder.zip | |
| image-embedder-backfill-lambda: | |
| - image-embedder.zip |