Merge branch 'main' into update-cspell-main #5652
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
name: "test-action" | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
permissions: | |
contents: read | |
env: | |
FETCH_DEPTH: 1 | |
jobs: | |
test-action: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
id: cspell-action | |
env: | |
TEST: true | |
- name: Show Results | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
Commits Ids: | |
``` | |
${{ toJSON(github.event.commits.*.id || 'undefined') }} | |
``` | |
test-action-with-file: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- uses: ./ | |
id: cspell-action | |
env: | |
TEST: true | |
with: | |
files: | | |
**/*.ts | |
**/*.md | |
- name: Show Results | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
test-action-no-increment: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- uses: ./ | |
id: cspell-action | |
env: | |
TEST: true | |
with: | |
incremental_files_only: false | |
files: | | |
. | |
- name: Show Results | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
test-action-no-increment-verbose: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- uses: ./ | |
id: cspell-action | |
with: | |
incremental_files_only: false | |
files: | | |
** | |
.*/** | |
verbose: true | |
- name: Show Results | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
test-action-files-with-issues: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- uses: ./ | |
id: cspell-action | |
with: | |
incremental_files_only: false | |
files: | | |
fixtures/** | |
config: ./fixtures/cspell.json | |
strict: false | |
inline: none | |
- name: Show Results | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
test-bad-config: # run the action | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ env.FETCH_DEPTH }} | |
- uses: ./ | |
id: cspell-action | |
continue-on-error: true | |
with: | |
incremental_files_only: false | |
files: | | |
fixtures/** | |
config: ./fixtures/cspell-missing-import.yaml | |
strict: false | |
inline: none | |
- name: Check Failure | |
if: ${{ steps.cspell-action.outputs.errors != '1' }} | |
run: exit 1 | |
- name: Show Results | |
if: ${{ !cancelled() }} | |
uses: streetsidesoftware/actions/public/summary@v1 | |
with: | |
text: | | |
outputs: | |
``````json | |
${{ toJSON(steps.cspell-action.outputs) }} | |
`````` | |
conclusion: | |
``````json | |
${{ toJSON(steps.cspell-action.conclusion) }} | |
`````` |