diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index dab79cd07..14c18e830 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -5,30 +5,33 @@ on: - cron: '30 19 * * MON-FRI' workflow_dispatch: +env: + # This may seem a little redundant, but copying the configuration to an environment variable makes it easier and safer + # to then write its contents to a file + INTEGRATION_TEST_CONFIG: ${{ vars.INTEGRATION_TEST_CONFIG }} + jobs: build: - if: ${{ vars.INTEGRATION_TESTS_BUCKET != '' }} + if: ${{ vars.INTEGRATION_TEST_CONFIG != '' }} runs-on: ubuntu-latest permissions: id-token: write contents: read steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 + - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 with: distribution: 'temurin' java-version: '21' cache: 'maven' - - uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 + - uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 name: Configure AWS credentials from Test account with: role-to-assume: ${{ vars.AWS_ROLE }} aws-region: ${{ vars.AWS_REGION }} - - name: Fetch integration utils library + - name: Write integration test configuration run: | - mkdir -p integration-tests/.libs mkdir -p integration-tests/src/main/resources - wget -O integration-tests/.libs/software.amazon.awssdk-sso.jar https://repo1.maven.org/maven2/software/amazon/awssdk/sso/2.19.8/sso-2.19.8.jar - aws s3 cp "s3://${{ vars.INTEGRATION_TESTS_BUCKET }}/config-latest.yml" integration-tests/src/main/resources/config.yml + echo "${INTEGRATION_TEST_CONFIG}" > integration-tests/src/main/resources/config.yml - name: Run and verify integration tests - run: ./mvnw clean compile test-compile failsafe:integration-test failsafe:verify + run: ./mvnw clean compile test-compile failsafe:integration-test failsafe:verify -P aws-sso diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index b1c820695..cd2b18d7b 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -57,4 +57,17 @@ + + + + aws-sso + + + + software.amazon.awssdk + sso + + + +