Skip to content

Update otel configuration files #474

Update otel configuration files

Update otel configuration files #474

Workflow file for this run

name: Test Everything
on:
pull_request:
jobs:
test-job:
name: All Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.21.4'
id: go
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: labels } = await github.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const labelToRemove = 'tests-passed';
const labelExists = labels.some(label => label.name === labelToRemove);
console.log("labelExists: ", labelExists);
if (labelExists) {
await github.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: labelToRemove
});
}
- name: Run Tests
run: |
echo "Git HEAD at: $(git rev-parse HEAD)"
./scripts/test unit || ./scripts/test unit || ./scripts/test unit
success-job:
needs: test-job
name: Add Label
runs-on: ubuntu-20.04
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['tests-passed']
})