-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ah/1388-bugfix
- Loading branch information
Showing
13 changed files
with
160 additions
and
67 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# The idea with this workflow is to allow core reviewers to trigger the | ||
# integration tests by pushing a branch to the sceptre repository. | ||
name: branch-integration-tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' # matches every branch that doesn't contain a '/' | ||
- '*/*' # matches every branch containing a single '/' | ||
- '**' # matches every branch | ||
- '!master' # excludes master | ||
|
||
jobs: | ||
integration-tests: | ||
if: ${{ github.ref != 'refs/heads/master' }} | ||
uses: "./.github/workflows/integration-tests.yaml" | ||
with: | ||
# role generated from https://github.com/Sceptre/sceptre-aws/blob/master/config/prod/gh-oidc-sceptre-tests.yaml | ||
role-to-assume: "arn:aws:iam::743644221192:role/gh-oidc-sceptre-tests" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Execute sanity checks | ||
name: check | ||
|
||
on: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# The idea with this workflow is to allow users to trigger an integration test | ||
# run from a PR however it doesn't work because github action does not allow | ||
# access to the github token when triggered from a PR. The workflow fails with.. | ||
# "Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers" | ||
|
||
name: comment-integration-tests | ||
|
||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
jobs: | ||
integration-tests: | ||
if: ${{ contains(github.event.review.body, '/integration-tests') }} | ||
uses: "./.github/workflows/integration-tests.yaml" | ||
with: | ||
# role generated from https://github.com/Sceptre/sceptre-aws/blob/master/config/prod/gh-oidc-sceptre-tests.yaml | ||
role-to-assume: "arn:aws:iam::743644221192:role/gh-oidc-sceptre-tests" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: integration-tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
aws-region: | ||
type: string | ||
default: us-east-1 | ||
role-to-assume: | ||
required: true | ||
type: string | ||
role-duration-seconds: | ||
type: number | ||
default: 3600 | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
# There is only one AWS account for running integration tests and the tests are not designed | ||
# to run concurrently in one account which is why we are disabling concurrency. | ||
# The intention is to have all triggered integration tests execute serially in one queue, | ||
# all triggered integration tests should wait in the queue however github is canceling | ||
# waiting jobs in the queue. Github currently does not support the desired use case, | ||
# more info at https://github.com/orgs/community/discussions/41518 | ||
concurrency: | ||
group: integration-tests | ||
cancel-in-progress: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install dependencies | ||
run: poetry install --no-interaction --all-extras | ||
# Update poetry for https://github.com/python-poetry/poetry/issues/7184 | ||
- name: update poetry | ||
run: poetry self update --no-ansi | ||
- name: Setup Python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Assume AWS role | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: ${{ inputs.aws-region }} | ||
role-to-assume: ${{ inputs.role-to-assume }} | ||
role-session-name: GHA-${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }} | ||
role-duration-seconds: ${{ inputs.role-duration-seconds }} | ||
- name: run tests | ||
run: poetry run behave integration-tests/features --junit --junit-directory build/behave | ||
env: | ||
AWS_DEFAULT_REGION: eu-west-1 |
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
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
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
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
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
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
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
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