mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-14 06:58:57 +00:00
53 lines
1.3 KiB
YAML
53 lines
1.3 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 modified files
|
|
if: github.event_name == 'pull_request'
|
|
id: files
|
|
run: |
|
|
echo "changed_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
|
|
echo $changed_files
|
|
|
|
- run: npm test
|
|
env:
|
|
EVENT: ${{ github.event_name }}
|
|
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
|
|
MODIFIED_FILES: ${{ steps.files.outputs.changed_files || '' }}
|