agents: share channel between OTLP exporters #667
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linters | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
push: | |
branches: | |
- main | |
- v[0-9]+.x-staging | |
- v[0-9]+.x | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: '3.12' | |
NODE_VERSION: lts/* | |
permissions: | |
contents: read | |
jobs: | |
lint-addon-docs: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Environment Information | |
run: npx envinfo | |
- name: Lint addon docs | |
run: NODE=$(command -v node) make lint-addon-docs | |
lint-cpp: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Environment Information | |
run: npx envinfo | |
- name: Lint C/C++ files | |
run: make lint-cpp | |
lint-js-and-md: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Environment Information | |
run: npx envinfo | |
- name: Lint JavaScript files | |
run: NODE=$(command -v node) make lint-js | |
- name: Get release version numbers | |
if: ${{ github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch && false }} | |
id: get-released-versions | |
run: ./tools/lint-md/list-released-versions-from-changelogs.mjs >> $GITHUB_OUTPUT | |
- name: Lint markdown files | |
run: | | |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" | |
NODE=$(command -v node) make lint-md | |
env: | |
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }} | |
lint-py: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Environment Information | |
run: npx envinfo | |
- name: Lint Python | |
run: | | |
make lint-py-build | |
make lint-py | |
lint-sh: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- run: shellcheck -V | |
- name: Lint Shell scripts | |
run: tools/lint-sh.mjs . | |
lint-pr-url: | |
if: ${{ github.event.pull_request }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
fetch-depth: 2 | |
persist-credentials: false | |
# GH Actions squashes all PR commits, HEAD^ refers to the base branch. | |
- run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }} | |
lint-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
with: | |
persist-credentials: false | |
- name: Get team members if possible | |
if: ${{ (github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch) || github.event.ref == github.event.repository.default_branch }} | |
id: team_members | |
run: | | |
get_list_members() { | |
TEAM="$1" | |
QUOTE='"' | |
gh api "/orgs/nodejs/teams/$TEAM/members" -X GET -f per_page=100 --jq "map(.login) | ${QUOTE}${TEAM}=\(tojson)${QUOTE}" | |
} | |
[ -z "$GITHUB_TOKEN" ] || ( | |
get_list_members "collaborators" | |
get_list_members "issue-triage" | |
get_list_members "tsc" | |
) >> "$GITHUB_OUTPUT" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} | |
- run: tools/lint-readme-lists.mjs "$TEAMS" | |
env: | |
TEAMS: ${{ tojson(steps.team_members.outputs) }} |