mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-06-01 16:12:00 +00:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: Validation
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
validation:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Get Files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v34
|
|
with:
|
|
files: |
|
|
sub-logs/**
|
|
reserved/**
|
|
- name: Install Modules
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
run: yarn
|
|
- name: Run Tests
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
id: tests
|
|
run: yarn test
|
|
env:
|
|
FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
actions_path: ${{ github.workspace }}
|
|
- name: Comment
|
|
if: steps.tests.outputs.shouldComment == 'true'
|
|
uses: mshick/add-pr-comment@v1
|
|
with:
|
|
message: |
|
|
## Validation Results
|
|
| Information Validation | Record Validation |
|
|
|-|-|
|
|
| ${{steps.tests.outputs.infoMessage}} ${{steps.tests.outputs.infoReason}} | ${{steps.tests.outputs.recordMessage}} ${{steps.tests.outputs.recordInfo}} |
|
|
|
|
### JSON File Content
|
|
```json
|
|
${{steps.tests.outputs.jsonData}}
|
|
```
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
proxy-url: https://api.is-a-good.dev/github-proxy/
|
|
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens
|
|
allow-repeats: false # Default: false
|