Skip to content

test: Convert transaction* and urltils tests to node:test (#2585) #20

test: Convert transaction* and urltils tests to node:test (#2585)

test: Convert transaction* and urltils tests to node:test (#2585) #20

name: Generate Compatibility Report
on:
workflow_dispatch:
inputs:
repo_target:
description: Generate the report for the local repo, the docs repo, or both.
required: true
type: choice
default: both
options:
- local
- docs
- both
workflow_run:
workflows: [ "Create Release" ]
types:
- completed
push:
branches:
- main
paths:
- 'test/versioned/**/package.json'
- 'ai-support.json'
jobs:
local:
runs-on: ubuntu-latest
if:
github.event_name == 'push' ||
(github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'workflow_dispatch' &&
(inputs.repo_target == 'local' || inputs.repo_target == 'both'))
steps:
- uses: actions/checkout@v4
- uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b
with:
repo: newrelic/newrelic-node-versions
platform: linux
arch: amd64
cache: enable
- run: |
nrversions -v -r . 2>status.log >./compatibility.md
# Upload generated artifacts for potential debugging purposes.
- uses: actions/upload-artifact@v4
if: always()
with:
name: status.log
path: status.log
- uses: actions/upload-artifact@v4
with:
name: compatibility.md
path: compatibility.md
# Generate the new PR to update the doc in the repo.
- run: |
rm -f status.log
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
title: "docs: Updated compatibility report"
commit-message: "docs: Updated compatibility report"
branch: "compatibility-report/auto-update"
delete-branch: true
base: main
labels: "documentation"
docs:
runs-on: ubuntu-latest
if:
github.event_name == 'push' ||
(github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'workflow_dispatch' &&
(inputs.repo_target == 'docs' || inputs.repo_target == 'both'))
env:
DOCS_TARGET: src/content/docs/apm/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent.mdx
steps:
- uses: actions/checkout@v4
with:
path: agent
- uses: actions/checkout@v4
with:
repository: newrelic/docs-website
path: docs
- uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b
with:
repo: newrelic/newrelic-node-versions
platform: linux
arch: amd64
cache: enable
- run: |
nrversions -v -r agent -R ./docs/${DOCS_TARGET} 2>docs-status.log
# Upload generated artifacts for potential debugging purposes.
- uses: actions/upload-artifact@v4
if: always()
with:
name: docs-status.log
path: docs-status.log
- uses: actions/upload-artifact@v4
with:
name: compatibility-requirements-nodejs-agent.mdx
path: docs/${{ env.DOCS_TARGET }}
# Generate the new PR to update the doc in the repo.
- run: |
rm -f docs-status.log
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
title: "docs: Updated Node.js agent compatibility report"
commit-message: "docs: Updated Node.js agent compatibility report"
branch: "nodejs-compatibility-report/auto-update"
delete-branch: true
base: develop
path: docs
labels: "documentation"