forked from cloudfoundry/gosigar
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
99 additions
and
213 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set examples=examples\df examples\free examples\ps examples\uptime | ||
(for %%i in (%examples%) do ( | ||
go build -o %%i\out.exe ./%%i | ||
%%i\out.exe | ||
)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
for exampleDir in "examples/df" "examples/free" "examples/ps" "examples/uptime" ; do | ||
go build -o ${exampleDir}/out.exe ./${exampleDir} | ||
pushd ${exampleDir} | ||
./out.exe | ||
popd | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: ci | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
## Concurrency only allowed in the main branch. | ||
## So old builds running for old commits within the same Pull Request are cancelled | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Lint | ||
run: |- | ||
go mod tidy && git diff --exit-code | ||
gofmt -l . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true | ||
go vet | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: ['1.15', '1.16'] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
cache: true | ||
cache-dependency-path: '**/go.sum' | ||
|
||
- name: Build | ||
run: go build | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Run examples | ||
run: ${{ startsWith(matrix.os,'windows') && '.github/examples.bat' || '.github/examples.sh' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: OpenTelemetry Export Trace | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- ci | ||
types: [completed] | ||
|
||
jobs: | ||
otel-export-trace: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current | ||
with: | ||
vaultUrl: ${{ secrets.VAULT_ADDR }} | ||
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} | ||
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} |
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
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