forked from inception-health/otel-export-trace-action
-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (53 loc) · 1.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
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" # Internal flag used to disable sending data to the collector