Skip to content

BUILD-6483 add workflow to be able to push to npmjs #1204

BUILD-6483 add workflow to be able to push to npmjs

BUILD-6483 add workflow to be able to push to npmjs #1204

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
env:
VAULT_ADDR: https://vault.sonar.build:8200
steps:
- name: Vault Secrets
id: secrets
uses: hashicorp/vault-action@d1720f055e0635fd932a1d2a48f87a666a57906c # v3.0.0
with:
url: ${{ env.VAULT_ADDR }}
method: jwt
path: jwt-ghwf
role: github-sonarsource-gh-action_release
secrets: |
development/kv/data/sonarcloud token | SONAR_TOKEN;
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version-file: main/.python-version
- name: Build
working-directory: main
run: |
python -m pip install --upgrade pip pipenv
make test
sed -i "s|<source>${GITHUB_WORKSPACE}|<source>/github/workspace|g" "${GITHUB_WORKSPACE}/main/build/coverage.xml"
- name: Test
working-directory: datadog-ingest
run: |
python -m pip install --upgrade requests
python main_test.py
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any