Skip to content

Merge branch 'master' into ruizb/release-2-2-0 #6084

Merge branch 'master' into ruizb/release-2-2-0

Merge branch 'master' into ruizb/release-2-2-0 #6084

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests
name: Continuous Integration
on: push
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
version: [14, 16, 18]
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
- run: yarn install --immutable
- run: yarn build
- run: yarn lint
- run: yarn no-only-in-tests
- run: yarn test
env:
CI: true
DD_SERVICE: datadog-ci-tests
DD_CIVISIBILITY_AGENTLESS_ENABLED: 1
DD_API_KEY: ${{ secrets.DATADOG_API_KEY_MAIN_ACCOUNT }}
DD_ENV: ci
NODE_OPTIONS: -r dd-trace/ci/init
- run: mkdir artifacts
- run: yarn pack --filename artifacts/datadog-ci-${{ matrix.version }}.tgz
- run: cp -r .github/workflows/e2e artifacts/
- uses: actions/upload-artifact@v1
with:
name: artifacts
path: artifacts/
e2e-test:
strategy:
matrix:
version: [14, 16, 18]
name: End-to-end test the package
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
- uses: actions/download-artifact@v1
with:
name: artifacts
- run: yarn add ./artifacts/datadog-ci-${{ matrix.version }}.tgz
- name: Run synthetics test
run: yarn datadog-ci synthetics run-tests --config artifacts/e2e/global.config.json
env:
DATADOG_API_KEY: ${{ secrets.datadog_api_key }}
DATADOG_APP_KEY: ${{ secrets.datadog_app_key }}
- name: Run sourcemaps upload test
run: yarn datadog-ci sourcemaps upload artifacts/e2e/sourcemaps/ --release-version=e2e --service=e2e-tests --minified-path-prefix=https://e2e-tests.datadoghq.com/static/
env:
DATADOG_API_KEY: ${{ secrets.datadog_api_key }}
DATADOG_APP_KEY: ${{ secrets.datadog_app_key }}
standalone-binary-test-ubuntu:
name: Test standalone binary in ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '14.18.3'
- run: yarn install --immutable
- run: yarn build
- name: Create standalone binary
run: yarn dist-standalone -t node14-linux-x64 -o datadog-ci_linux-x64
- name: Remove dist and src folder to check that binary can stand alone
run: |
rm -rf dist
rm -rf src
- name: Test generated standalone binary
run: yarn dist-standalone:test
standalone-binary-test-windows:
name: Test standalone binary in windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '14.18.3'
- run: yarn install --immutable
- run: yarn build:win
- name: Create standalone binary
run: yarn dist-standalone -t node14-win-x64 -o datadog-ci_win-x64
- name: Remove dist and src folder to check that binary can stand alone
run: |
rm dist -r
rm src -r
- name: Test generated standalone binary
run: yarn dist-standalone:test
standalone-binary-test-macos:
name: Test standalone binary in macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '14.18.3'
- run: yarn install --immutable
- run: yarn build
- name: Create standalone binary
run: yarn dist-standalone -t node14-macos-x64 -o datadog-ci_darwin-x64
- name: Remove dist and src folder to check that binary can stand alone
run: |
rm -rf dist
rm -rf src
- name: Test generated standalone binary
run: yarn dist-standalone:test
check-licenses:
name: Check licenses
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '14'
- run: yarn check-licenses