2020-10-22 06:23:39 -04:00
|
|
|
name: Test Action
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-14 16:28:41 -04:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-07 04:05:58 -04:00
|
|
|
|
|
|
|
- name: Get yamllint version
|
|
|
|
run: yamllint --version
|
|
|
|
|
|
|
|
- id: lint-with-config
|
|
|
|
name: lint with config
|
2020-10-22 06:23:39 -04:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
file_or_dir: test
|
|
|
|
config_data: |
|
|
|
|
extends: default
|
|
|
|
ignore: nok.yaml
|
|
|
|
rules:
|
|
|
|
new-line-at-end-of-file:
|
|
|
|
level: warning
|
|
|
|
trailing-spaces:
|
|
|
|
level: warning
|
|
|
|
|
2021-10-07 04:05:58 -04:00
|
|
|
- id: lint-all-no-warnings
|
|
|
|
name: lint all - no warnings (continue on error)
|
2021-05-26 02:56:08 -04:00
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
file_or_dir: test
|
|
|
|
strict: true
|
|
|
|
no_warnings: true
|
|
|
|
|
2021-10-07 04:05:58 -04:00
|
|
|
- id: lint-all-continue
|
|
|
|
name: lint all (continue on error)
|
2020-10-22 06:23:39 -04:00
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
file_or_dir: test
|
|
|
|
strict: true
|
2021-10-07 04:05:58 -04:00
|
|
|
format: standard
|
2021-08-18 09:23:29 -04:00
|
|
|
|
2021-10-07 04:05:58 -04:00
|
|
|
- id: default-lint-all
|
|
|
|
name: default lint all (continue on error)
|
2021-08-18 09:23:29 -04:00
|
|
|
continue-on-error: true
|
|
|
|
uses: ./
|
2021-10-07 04:05:58 -04:00
|
|
|
|
|
|
|
- id: print-output
|
|
|
|
if: always()
|
|
|
|
name: Print output
|
|
|
|
run: |
|
|
|
|
echo ${{ steps.lint-with-config.outputs.logfile }}
|
|
|
|
cat ${{ steps.lint-with-config.outputs.logfile }}
|
|
|
|
|
|
|
|
echo ${{ steps.lint-all-continue.outputs.logfile }}
|
|
|
|
cat ${{ steps.lint-all-continue.outputs.logfile }}
|