Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): integrate ci analytics #1

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3be907b
feat(ci): integrate ci analytics
pandomic Nov 22, 2024
8d4c67a
update test workflow
pandomic Nov 27, 2024
be21a10
update test workflow
pandomic Nov 27, 2024
cbad002
update test workflow
pandomic Nov 27, 2024
a04c158
update test workflow
pandomic Nov 27, 2024
4c58d59
update test workflow
pandomic Nov 27, 2024
6e0064d
update test workflow
pandomic Nov 27, 2024
97bb8a0
update test workflow
pandomic Nov 27, 2024
2e3b436
update test workflow
pandomic Nov 27, 2024
5e2801e
update test workflow
pandomic Nov 27, 2024
14ed91d
update test workflow
pandomic Nov 27, 2024
2caf103
update test workflow
pandomic Nov 27, 2024
3ebb0f0
update test workflow
pandomic Nov 27, 2024
b4327cd
update test workflow
pandomic Nov 27, 2024
4e4469f
update test workflow
pandomic Nov 27, 2024
cf33946
update test workflow
pandomic Nov 27, 2024
ff41d3a
update test workflow
pandomic Nov 27, 2024
00e5a28
update test workflow
pandomic Nov 27, 2024
f45134c
update test workflow
pandomic Nov 27, 2024
bb066cf
update test workflow
pandomic Nov 27, 2024
aa5d68c
update test workflow
pandomic Nov 27, 2024
1d0986e
update test workflow
pandomic Nov 27, 2024
6d1055d
update test workflow
pandomic Nov 27, 2024
d968e33
update test workflow
pandomic Nov 27, 2024
e0dbf41
update test workflow
pandomic Nov 27, 2024
c8f7426
update test workflow
pandomic Nov 28, 2024
deae3ee
update test workflow
pandomic Nov 28, 2024
5c51eec
update test workflow
pandomic Nov 28, 2024
3a097be
update test workflow
pandomic Nov 28, 2024
452cad6
update test workflow
pandomic Nov 28, 2024
0328b51
update test workflow
pandomic Nov 28, 2024
d5fac06
update test workflow
pandomic Nov 28, 2024
b228d2f
update test workflow
pandomic Nov 28, 2024
921b295
update test workflow
pandomic Nov 28, 2024
222f2b9
update test workflow
pandomic Nov 28, 2024
4f66506
update test workflow
pandomic Nov 28, 2024
89f620e
update test workflow
pandomic Nov 28, 2024
7e10cd9
update test workflow
pandomic Nov 28, 2024
ccbcf26
update test workflow
pandomic Nov 28, 2024
564ce5d
update test workflow
pandomic Nov 28, 2024
75c54cb
update test workflow
pandomic Nov 28, 2024
d9d01c4
update test workflow
pandomic Nov 28, 2024
24d2dd7
update test workflow
pandomic Nov 28, 2024
0b34f47
update test workflow
pandomic Nov 28, 2024
9408e66
update test workflow
pandomic Nov 28, 2024
c5886ab
update test workflow
pandomic Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 48 additions & 12 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout CI Extension
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PULL_TOKEN }}
repository: localstack/localstack-ci-extension
path: localstack-ci-extension

- name: Checkout CI Extension Plugin
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PULL_TOKEN }}
repository: localstack/localstack-ci-extension-plugins
path: localstack-ci-extension-plugins

- name: Set up Python 3.11
id: setup-python
uses: actions/setup-python@v2
Expand All @@ -41,39 +55,61 @@ jobs:
- name: Set up Dependencies
run: |
pip install requests boto3 pytest localstack-sdk-python
pip install localstack-ci-extension-plugins/pytest_plugin
echo "CI_EXTENSION_PATH=$GITHUB_WORKSPACE/localstack-ci-extension" >> $GITHUB_ENV

- name: Start LocalStack
uses: LocalStack/[email protected]
with:
image-tag: 'latest'
use-pro: 'true'
configuration: LS_LOG=trace
configuration: LS_LOG=trace DEBUG=1 DOCKER_FLAGS="-v ${{ env.CI_EXTENSION_PATH }}:/extensions/ci-extension -e API_ENDPOINT=https://api.staging.aws.localstack.cloud/v1"
install-awslocal: 'true'
extension-auto-install: '/extensions/ci-extension'
env:
API_ENDPOINT: 'https://api.staging.aws.localstack.cloud/v1'
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
LOCALSTACK_PROJECT_ID: ${{ secrets.LOCALSTACK_PROJECT_ID }}
LOCALSTACK_PIPELINE_ID: ${{ secrets.LOCALSTACK_PIPELINE_ID }}

- name: Deploy infrastructure
run: |
START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
bash bin/deploy.sh
END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
curl -X POST http://localhost:4566/_localstack/extensions/ci/steps \
-H "Content-Type: application/json" \
-d '{
pandomic marked this conversation as resolved.
Show resolved Hide resolved
"step_id": "deploy",
"name": "Deploy Infrastructure",
"step_type" : "deploy",
"state": "passed",
"time_start": "'"$START_TIME"'",
"time_end": "'"$END_TIME"'"
}'

START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
bash bin/seed.sh
END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
curl -X POST http://localhost:4566/_localstack/extensions/ci/steps \
-H "Content-Type: application/json" \
-d '{
"step_id": "seed",
"name": "Seed Data",
"step_type" : "deploy",
"state": "passed",
"time_start": "'"$START_TIME"'",
"time_end": "'"$END_TIME"'"
}'

- name: Run Integration Tests
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
run: |
pytest tests/test_infra.py

- name: Run Outages Tests
- name: Run Tests
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
run: |
pytest tests/test_outage.py
pytest tests

- name: Show localstack logs
if: always()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Python

.idea
.Python
build/
develop-eggs/
Expand Down
Loading