Skip to content

Merge pull request #15 from mxiamxia/fix-import #32

Merge pull request #15 from mxiamxia/fix-import

Merge pull request #15 from mxiamxia/fix-import #32

name: Integration Testing
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
build:
name: Integration Test
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layer
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
role-duration-seconds: 2400
aws-region: us-east-1
- name: Login to ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run test containers
run: docker-compose up --abort-on-container-exit
working-directory: .github/collector
env:
INSTANCE_ID: ${{ github.run_id }}-${{ github.run_number }}
LISTEN_ADDRESS: 0.0.0.0:8000
VALIDATOR_COMMAND: -c default-otel-trace-validation.yml --endpoint http://app:8000 --metric-namespace aws-otel-integ-test -t ${{ github.run_id }}-${{ github.run_number }}