mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
45 lines
No EOL
1.6 KiB
YAML
45 lines
No EOL
1.6 KiB
YAML
name: check
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, edited]
|
|
branches:
|
|
- master
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
- uses: tj-actions/changed-files@v45
|
|
id: files
|
|
with:
|
|
files_yaml: |
|
|
js:
|
|
- tests/**/*.{js,ts}
|
|
- scripts/**/*.{js,mts,ts}
|
|
- sites/**/*.{js,ts}
|
|
channels:
|
|
- sites/**/*.channels.xml
|
|
- uses: actions/setup-node@v4
|
|
if: ${{ !env.ACT && (steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true') }}
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
- name: install dependencies
|
|
if: steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true'
|
|
run: SKIP_POSTINSTALL=1 npm install
|
|
- name: check changed js-files
|
|
if: steps.files.outputs.js_any_changed == 'true'
|
|
run: |
|
|
npx eslint ${{ steps.files.outputs.js_all_changed_files }}
|
|
- name: check changed *.channels.xml
|
|
if: steps.files.outputs.channels_any_changed == 'true'
|
|
run: |
|
|
npm run channels:lint -- ${{ steps.files.outputs.channels_all_changed_files }}
|
|
npm run postinstall
|
|
npm run channels:validate -- ${{ steps.files.outputs.channels_all_changed_files }} |