-
Notifications
You must be signed in to change notification settings - Fork 40
add gh action workflow to mirror circle ci #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kevinkruger
merged 42 commits into
main
from
IDE-657-s-migrate-workflow-launchdarkly-ld-find-code-refs-lint
Jan 7, 2025
Merged
Changes from 19 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
d860f40
add gh action workflow to mirror circle ci
kevinkruger 11034ba
add newline
kevinkruger abff4d5
simplify the workflow
kevinkruger a840939
make sure test run sequentially
kevinkruger 9a6f01f
log file path
kevinkruger bb5d29e
log write path
kevinkruger ca370e6
remove error
kevinkruger 7a975dd
remove uneeded variable
kevinkruger d2a0731
add install dependencies step
kevinkruger c41fcd9
remove pre commit hook
kevinkruger 479a579
only run lint via pre commit
kevinkruger 795bba7
add go test sum
kevinkruger ba05af2
add github actions docs step
kevinkruger 99cf78c
only run pre commit
kevinkruger 2fa72a0
remove circle ci
kevinkruger f7d1503
remove print ln
kevinkruger 8584bca
add step to publish the results of the test suite
kevinkruger a6d0041
fix gh actions folder path
kevinkruger 49ea11e
install datadog ci
kevinkruger 5e7e14d
use golang lint gh actoin
kevinkruger f6619ba
use pre commit action
kevinkruger b79b7b5
update to newest version of golangci-lint
kevinkruger e353892
fix version
kevinkruger 3b58eda
make linter happy
kevinkruger e68f87d
more linting
kevinkruger 1035cae
more linting
kevinkruger 511460a
no lint lint issues
kevinkruger 2eba4b5
lint exceptions
kevinkruger c8694a6
no lint
kevinkruger 2dcaa8f
formating
kevinkruger 0672bbe
more linting
kevinkruger 17c632f
unused param removal / bug
kevinkruger 902c901
do not close request bc test needs it
kevinkruger 16653b7
revert linter changes
kevinkruger d64c345
change value to two
kevinkruger 8901875
add no lint
kevinkruger 284a233
remove duplicate step
kevinkruger e169cde
linting
kevinkruger 241b9fb
Merge branch 'main' into IDE-657-s-migrate-workflow-launchdarkly-ld-f…
kevinkruger f96eae0
add new line
kevinkruger 84a64ce
remove new line
kevinkruger 25b3f90
add back in code that was removed
kevinkruger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,75 @@ | ||
| 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: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y git python3-pip | ||
| 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 | ||
| pip install pre-commit | ||
kevinkruger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Run pre-commit hooks | ||
| run: pre-commit run -a golangci-lint | ||
kevinkruger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - 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 | ||
|
|
||
| - name: Install npm | ||
| run: sudo apt-get install -y npm | ||
kevinkruger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Install action-docs | ||
| run: npm install action-docs | ||
|
|
||
| - name: Install Python | ||
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b | ||
| with: | ||
| python-version: '3.x' | ||
|
|
||
| - name: Install pre-commit | ||
| run: pip install pre-commit | ||
|
|
||
| - name: Run pre-commit hooks | ||
| run: pre-commit run -a github-action-docs | ||
kevinkruger marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.