Skip to content

[ASCII-1498] add dependency list test for the serverless binary #12692

[ASCII-1498] add dependency list test for the serverless binary

[ASCII-1498] add dependency list test for the serverless binary #12692

name: "Serverless Integration Tests"
on:
pull_request:
branches-ignore:
- 'mq-working-branch-*'
paths:
- 'cmd/serverless/**'
- 'pkg/serverless/**'
- 'test/integration/serverless/**'
- '.github/workflows/serverless-integration.yml'
schedule:
- cron: '0 14 * * *' # cron schedule uses UTC timezone. Run tests at the beginning of the day in US-East
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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
path: go/src/github.com/DataDog/datadog-agent
- name: Set up Node 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- 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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
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@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
with:
image: tonistiigi/binfmt:latest
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- 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@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SERVERLESS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SERVERLESS_AWS_SECRET_ACCESS_KEY }}
with:
timeout_minutes: 60
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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: rawlogs-${{ matrix.suite }}-${{ matrix.architecture }}
path: ${{ steps.rawlogs.outputs.dir }}