Skip to content

Commit

Permalink
Merge pull request #30 from step-security/shubham-patch-2
Browse files Browse the repository at this point in the history
update readme & ci-cd workflow
  • Loading branch information
shubham-stepsecurity authored Jul 23, 2024
2 parents 97e3e8d + 54ba88d commit 8ff5494
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
name: "Test macOS"
uses: "./.github/workflows/test-os.yml"
with:
os: '["macos-11", "macos-12", "macos-13"]'
os: '["macos-12", "macos-13"]'

test-lnx:
name: "Test Ubuntu"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ jobs:
- os: macos-latest
os-label: macOS
python: "installed"
- os: macos-11
os-label: macOS 11
python: "installed"

- os: ubuntu-latest
os-label: Linux
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ or ![ARM Linux](misc/badge-arm.svg) self-hosted runners:

```yaml
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
if: always()
with:
files: |
Expand All @@ -27,7 +27,7 @@ and ![Windows](misc/badge-windows.svg) (e.g. `runs-on: windows-latest`) runners:

```yaml
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action/composite@v1
uses: step-security/publish-unit-test-result-action/composite@v2
if: always()
with:
files: |
Expand Down Expand Up @@ -271,7 +271,7 @@ The `json` output of the action can be accessed through the expression `steps.<i

```yaml
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
id: test-results
if: always()
with:
Expand Down Expand Up @@ -482,7 +482,7 @@ jobs:
path: artifacts
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
with:
files: "artifacts/**/*.xml"
```
Expand Down Expand Up @@ -594,7 +594,7 @@ jobs:
path: artifacts
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
Expand Down Expand Up @@ -627,7 +627,7 @@ Add the event name to `check_name` to avoid different event types overwriting ea

```yaml
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
if: always()
with:
check_name: "Test Results (${{ github.event.workflow_run.event || github.event_name }})"
Expand All @@ -640,7 +640,7 @@ Disabling the pull request comment mode (`"off"`) for events other than `pull_re

```yaml
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
if: always()
with:
# set comment_mode to "always" for pull_request event, set to "off" for all other event types
Expand All @@ -658,7 +658,7 @@ Disabling the pull request comment mode (`"off"`) for events other than `pull_re
steps:
- …
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
id: test-results
if: always()
with:
Expand Down Expand Up @@ -710,9 +710,9 @@ You can then use the badge via this URL: https://gist.githubusercontent.com/{use

It is known that this action works best with relative paths (e.g. `test-results/**/*.xml`),
but most absolute paths (e.g. `/tmp/test-results/**/*.xml`) require to use the composite variant
of this action (`uses: step-security/publish-unit-test-result-action/composite@v1`).
of this action (`uses: step-security/publish-unit-test-result-action/composite@v2`).

If you have to use absolute paths with the non-composite variant of this action (`uses: step-security/publish-unit-test-result-action@v1`),
If you have to use absolute paths with the non-composite variant of this action (`uses: step-security/publish-unit-test-result-action@v2`),
you have to copy files to a relative path first, and then use the relative path:

```yaml
Expand All @@ -723,7 +723,7 @@ you have to copy files to a relative path first, and then use the relative path:
shell: bash
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
if: always()
with:
files: |
Expand Down
1 change: 1 addition & 0 deletions composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ runs:
;;
macOS*)
echo "pip-cache=~/Library/Caches/pip" >> $GITHUB_OUTPUT
echo "pip-options=--break-system-packages" >> $GITHUB_OUTPUT
;;
Windows*)
echo "pip-cache=~\\AppData\\Local\\pip\\Cache" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 8ff5494

Please sign in to comment.