Add properties for AWS S3 regions #1603
Workflow file for this run
This file contains 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: 'CI: Integration tests' | |
on: | |
workflow_dispatch: | |
inputs: { } | |
push: | |
paths: | |
- project/Dependencies.scala | |
- project/Module.scala | |
- article-api/** | |
- project/articleapi.scala | |
- draft-api/** | |
- project/draftapi.scala | |
- search-api/** | |
- project/searchapi.scala | |
- learningpath-api/** | |
- project/learningpathapi.scala | |
- integration-tests/** | |
- project/integrationtests.scala | |
pull_request: | |
paths: | |
- project/Dependencies.scala | |
- project/Module.scala | |
- article-api/** | |
- project/articleapi.scala | |
- draft-api/** | |
- project/draftapi.scala | |
- search-api/** | |
- project/searchapi.scala | |
- learningpath-api/** | |
- project/learningpathapi.scala | |
- integration-tests/** | |
- project/integrationtests.scala | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_CLIENT_ID }} | |
AWS_DEFAULT_REGION: eu-west-1 | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_CLIENT_SECRET }} | |
NDLA_AWS_ECR_REPO: ${{ secrets.NDLA_AWS_ECR_REPO }} | |
CI_RELEASE_ROLE: ${{ secrets.CI_RELEASE_ROLE }} | |
CI_GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
NDLA_RELEASES: ${{ secrets.NDLA_RELEASES }} | |
COMPONENT: integration-tests | |
jobs: | |
integration_tests: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: coursier/cache-action@v6 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: '17' | |
- name: Login to ECR repo | |
run: RES=$(aws sts assume-role --role-arn $CI_RELEASE_ROLE --role-session-name | |
github-actions-ecr-login) AWS_ACCESS_KEY_ID=$(echo $RES | jq -r .Credentials.AccessKeyId) | |
AWS_SECRET_ACCESS_KEY=$(echo $RES | jq -r .Credentials.SecretAccessKey) AWS_SESSION_TOKEN=$(echo | |
$RES | jq -r .Credentials.SessionToken) aws ecr get-login-password --region | |
eu-central-1 | docker login --username AWS --password-stdin $NDLA_AWS_ECR_REPO | |
- name: Login to dockerhub | |
run: echo $DOCKER_HUB_PASSWORD | docker login --username $DOCKER_HUB_USERNAME | |
--password-stdin | |
- name: Integration tests | |
run: sbt integration-tests/test |