mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-14 10:58:46 +00:00
58 lines
1.5 KiB
YAML
58 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
|
|
|
|
- name: Clone is-a-dev/register
|
|
run: git clone https://github.com/is-a-dev/register.git register-${{ github.run_id }}
|
|
|
|
- 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: Run tests
|
|
run: npx ava tests/*.test.js
|
|
env:
|
|
EVENT: ${{ github.event_name }}
|
|
RUN_ID: ${{ github.run_id }}
|
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
|
MODIFIED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|