Add node version to .tool-versions for mise #7103
Workflow file for this run
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 | |
| # These options should mimic those set in ElasticSearchDockerBase.scala, because this is | |
| # the CI version of the TestContainers approach we use for running tests locally. | |
| # `xpack.security.enabled=false` is needed since v8 for tests to use plain | |
| # unauthenticated HTTP, because in v7 => v8 they changed the default to `true`: | |
| # https://www.elastic.co/guide/en/elasticsearch/reference/8.18/release-notes-8.0.0.html#:~:text=Set%20xpack.security.enabled%20to%20true%20for%20all%20licenses | |
| # | |
| # `--health-` settings make it wait for es to report healthy before continuing. | |
| # see https://github.com/actions/example-services/blob/master/.github/workflows/postgres-service.yml#L28 | |
| options: -e "discovery.type=single-node" -e "xpack.security.enabled=false" --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 |