mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-21 20:25:44 +00:00
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: Validation
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "domains/*"
|
|
- "tests/*"
|
|
- "util/*"
|
|
- ".github/workflows/validation.yml"
|
|
- "dnsconfig.js"
|
|
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-validation
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
dns:
|
|
name: DNS
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check
|
|
uses: is-a-dev/dnscontrol-action@main
|
|
with:
|
|
args: check
|
|
|
|
tests:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: npm install
|
|
|
|
- name: Get all modified domain JSON files
|
|
if: github.event_name == 'pull_request'
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v45
|
|
with:
|
|
files: domains/*.json
|
|
|
|
- name: testing
|
|
run: |
|
|
ls
|
|
ls ../
|
|
echo ${{ steps.changed-files.outputs.all_changed_files }}
|
|
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
cat $file
|
|
done
|
|
|
|
- run: npm test
|
|
env:
|
|
EVENT: ${{ github.event_name }}
|
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
|
MODIFIED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|