Skip to content

STAC-21039: Some more test fixes #4

STAC-21039: Some more test fixes

STAC-21039: Some more test fixes #4

name: "Serverless Integration Tests"
on:
push:
paths:
- 'cmd/serverless/**'
- 'pkg/serverless/**'
- 'test/integration/serverless/**'
- '.github/workflows/serverless-integration.yml'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
architecture: [amd64, arm64]
suite: [metric, log, trace, appsec, proxy]
name: ${{ matrix.suite }} on ${{ matrix.architecture }}
steps:
- name: Checkout datadog-agent repository
uses: actions/checkout@v4
with:
path: go/src/github.com/DataDog/datadog-agent
- name: Set up Node 14
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install Serverless Framework
run: sudo yarn global add serverless@^3.36.0 --prefix /usr/local
- name: Checkout the datadog-lambda-extension repository
uses: actions/checkout@v4
with:
repository: DataDog/datadog-lambda-extension
path: go/src/github.com/DataDog/datadog-lambda-extension
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Create raw logs directory
id: rawlogs
run: |-
DIR=$(mktemp -d)
echo "dir=${DIR}" >> $GITHUB_OUTPUT
- name: Run tests if AWS credentials are available
id: test
uses: nick-fields/retry@v2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SERVERLESS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SERVERLESS_AWS_SECRET_ACCESS_KEY }}
with:
timeout_minutes: 45
max_attempts: 2
command: |
RAWLOGS_DIR="${{ steps.rawlogs.outputs.dir }}/${{ matrix.architecture }}"
cd go/src/github.com/DataDog/datadog-agent
ARCHITECTURE=${{ matrix.architecture }} RAWLOGS_DIR=$RAWLOGS_DIR \
./test/integration/serverless/run.sh ${{ matrix.suite }}
- name: Archive raw logs
if: always()
uses: actions/upload-artifact@v3
with:
name: rawlogs
path: ${{ steps.rawlogs.outputs.dir }}