-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gh action workflow to mirror circle ci (#468)
Migrate the circle ci workflow to gh actions
- Loading branch information
1 parent
4413d04
commit e3f10c1
Showing
9 changed files
with
131 additions
and
121 deletions.
There are no files selected for viewing
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,35 @@ | ||
name: Publish JUnit Tests | ||
description: Publishes JUnit tests to one or more sources | ||
inputs: | ||
files: | ||
required: true | ||
description: The JUnit files to upload | ||
name: | ||
required: true | ||
description: The name of the suite | ||
datadog: | ||
required: false | ||
description: Upload to Datadog | ||
default: 'true' | ||
github: | ||
required: false | ||
description: Upload to GitHub | ||
default: 'true' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Report Tests to Datadog | ||
shell: bash | ||
if: ${{ inputs.datadog }} == 'true' | ||
run: datadog-ci junit upload --service ${{ inputs.name }} ${{ inputs.files }} | ||
|
||
- name: Test Publish | ||
uses: phoenix-actions/test-reporting@f957cd93fc2d848d556fa0d03c57bc79127b6b5e # v15 | ||
if: ${{ inputs.github }} == 'true' | ||
with: | ||
name: ${{ inputs.name }} | ||
output-to: step-summary | ||
path: ${{ inputs.files }} | ||
reporter: java-junit | ||
fail-on-error: 'false' |
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,68 @@ | ||
name: Test and Generate Docs | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
go-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Install datadog-ci | ||
run: npm install -g @datadog/datadog-ci | ||
|
||
- name: Install Dependencies | ||
run: | | ||
go install github.com/jstemmer/go-junit-report@v1.0.0 | ||
go install github.com/kyoh86/richgo@v0.3.10 | ||
go install gotest.tools/gotestsum@latest | ||
- name: Install golangci-lint | ||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | ||
with: | ||
version: v1.62.2 | ||
|
||
- name: Run tests with gotestsum | ||
run: | | ||
mkdir -p ${{ github.workspace }}/artifacts | ||
mkdir -p ${{ github.workspace }}/reports | ||
gotestsum --packages="./..." \ | ||
--junitfile ${{ github.workspace }}/reports/go-test_go_tests.xml \ | ||
--jsonfile ${{ github.workspace }}/artifacts/go-test_go_tests.json \ | ||
--rerun-fails=2 \ | ||
--rerun-fails-max-failures=10 \ | ||
--rerun-fails-report ${{ github.workspace }}/artifacts/rerun_tests_go_tests.txt | ||
- name: Publish JUnit Tests | ||
uses: ./.github/actions/publish-junit | ||
env: | ||
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }} | ||
with: | ||
files: ${{ github.workspace }}/reports/go-test_go_tests.xml | ||
name: find-code-references-in-pull-request | ||
datadog: 'true' | ||
github: 'true' | ||
|
||
github-actions-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | ||
|
||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install action-docs | ||
run: npm install action-docs | ||
|
||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | ||
with: | ||
extra_args: github-action-docs --all-files |
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
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
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