Explain differences between workflow_run and run in existing workflow… #92
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: "Build" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Biome (format + lint + import sorting) | |
run: npm run biome:ci | |
- name: Build | |
run: npm run build | |
- name: Validate dist | |
run: | | |
git diff | |
exit $(git status --porcelain | wc -l) | |
tests: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: run tests | |
run: npm run test:ci | |
- uses: inception-health/otel-upload-test-artifact-action@v1 | |
if: always() | |
with: | |
jobName: "tests (${{ matrix.os }})" | |
stepName: "run tests" | |
path: "junit.xml" | |
type: "junit" | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
otel-cicd: | |
needs: [tests, build] | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Export workflow | |
uses: ./ | |
with: | |
otlpEndpoint: "test" | |
otlpHeaders: "test" | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
OTEL_CONSOLE_ONLY: "true" |