Skip to content

move to GitHub Actions #4346

move to GitHub Actions

move to GitHub Actions #4346

Workflow file for this run

name: Grid CI
on:
workflow_dispatch: # Manual invocation.
push:
jobs:
CI:
runs-on: ubuntu-latest
permissions:
# required by aws-actions/configure-aws-credentials
id-token: write
contents: read
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
# Wait for elasticsearch 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" --expose 9200 --health-cmd "curl localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10
localstack:
image: localstack/localstack:0.11.0
env:
SERVICES: kinesis,dynamodb
DEFAULT_REGION: eu-west-1
KINESIS_ERROR_PROBABILITY: 0.0
PORT_WEB_UI: 5050
ports:
- 5050:5050
- 4566:4566
options: >-
--health-cmd "curl localhost:5050/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Kahuna (client-side)
working-directory: ./kahuna
run: |
npm install-clean
npm run undist
npm test
npm run dist
- name: SBT
uses: ./.github/actions/sbt
env:
USE_DOCKER_FOR_TESTS: false
ES6_TEST_URL: http://elasticsearch:9200
LOCALSTACK_ENDPOINT: http://localstack:4566
with:
args: clean compile test:compile test debian:packageBin
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
- name: Image Counter Lambda
working-directory: ./image-counter-lambda
run: |
npm install-clean
npm test
npm run compile
- name: S3Watcher
working-directory: ./s3watcher/lambda
run: |
npm install-clean
npm test
npm run build
- uses: guardian/actions-riff-raff@v2
with:
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
s3watcher:
- s3watcher/lambda/target/s3watcher.zip