-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (47 loc) · 1.57 KB
/
integration-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on:
push:
branches:
- main
jobs:
build:
name: Integration Test
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layer
uses: actions/cache@v2
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: 1200
aws-region: us-east-1
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: public.ecr.aws
- name: Build docker image
uses: docker/build-push-action@v2
with:
context: sampleapp
push: true
tags: |
public.ecr.aws/u0d6r4y4/aws-otel-go-test-gorilla:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Run test containers
run: docker-compose up --abort-on-container-exit
working-directory: .github/collector
env:
LISTEN_ADDRESS: 0.0.0.0:8080
APP_IMAGE: public.ecr.aws/u0d6r4y4/aws-otel-go-test-gorilla:${{ github.sha }}
VALIDATOR_COMMAND: -c go-otel-trace-validation.yml --endpoint http://app:8080 -t ${{ github.run_id }}-${{ github.run_number }}