Skip to content

Fix ts errors

Fix ts errors #8933

name: "Lib Injection Test"
on:
pull_request:
push:
branches: [master]
schedule:
- cron: '0 4 * * *'
jobs:
build-and-publish-init-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
- name: Log in to the Container registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Docker Image Tag
id: set_names
run: |
echo "Docker image tag: $(echo ${GITHUB_HEAD_REF-${GITHUB_REF#refs/heads/}} | tr / -)"
echo "image_name=$(echo ${GITHUB_HEAD_REF-${GITHUB_REF#refs/heads/}} | tr / -)" >> $GITHUB_OUTPUT
- name: Npm pack for injection image
run: |
npm pack
- uses: ./.github/actions/injection
with:
init-image-version: ${GITHUB_SHA}
- name: Push snapshot image
run: |
docker buildx build --platform=linux/amd64,linux/arm/v7,linux/arm64/v8 -t ghcr.io/datadog/dd-trace-js/dd-lib-js-init:latest_snapshot --push lib-injection
if: ${{ steps.set_names.outputs.image_name }} == 'master'
lib-injection-tests:
needs:
- build-and-publish-init-image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
lib-injection-connection: [ 'network','uds']
lib-injection-use-admission-controller: ['', 'use-admission-controller']
weblog-variant: [ 'sample-app']
fail-fast: false
env:
TEST_LIBRARY: nodejs
WEBLOG_VARIANT: ${{ matrix.weblog-variant }}
LIBRARY_INJECTION_CONNECTION: ${{ matrix.lib-injection-connection }}
LIBRARY_INJECTION_ADMISSION_CONTROLLER: ${{ matrix.lib-injection-use-admission-controller }}
DOCKER_REGISTRY_IMAGES_PATH: ghcr.io/datadog
DOCKER_IMAGE_TAG: ${{ github.sha }}
BUILDX_PLATFORMS: linux/amd64
MODE: manual
steps:
- name: lib-injection test runner
id: lib-injection-test-runner
uses: DataDog/system-tests/lib-injection/runner@main
with:
docker-registry: ghcr.io
docker-registry-username: ${{ github.repository_owner }}
docker-registry-password: ${{ secrets.GITHUB_TOKEN }}
test-script: ./lib-injection/run-manual-lib-injection.sh