From b133afc4747e010018162f08394a7a2cd7c12eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1lm=C3=A1n=20=E2=80=9EKAMI=E2=80=9D=20Szalai?= Date: Thu, 4 Aug 2022 18:59:12 +0200 Subject: [PATCH] Add first version of a test workflow --- .github/workflows/test_playlist.yml | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/test_playlist.yml diff --git a/.github/workflows/test_playlist.yml b/.github/workflows/test_playlist.yml new file mode 100644 index 0000000..e638af7 --- /dev/null +++ b/.github/workflows/test_playlist.yml @@ -0,0 +1,50 @@ +name: Test IPTV file quality + +on: + push: + branches + - "*" + +jobs: + test: + runs-on: node + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: "16.x" + + - name: Install m3u-linter and check the playlist + run: | + npm install -g m3u-linter || true + cat < M3u-linter.config.json + { + "files": ["playlist1.m3u", "playlist2.m3u"], + "rules": { + "no-empty-lines": true, + "require-header": true, + "attribute-quotes": true, + "require-info": true, + "no-trailing-spaces": true, + "no-whitespace-before-title": true, + "no-multi-spaces": true, + "no-extra-comma": true, + "space-before-paren": true, + "no-dash": true + } + } + EOF + ls -lar ./ || true + cat playlist.m3u8 || true + m3u-linter -c ./m3u-linter.config.json ./playlist.m3u8 + + - name: Install IPTV Checker and check the playlist + run: | + npm install -g iptv-checker || true + mkdir -p output + iptv-checker -o output -p 100 -t 120000 ./playlist.m3u8 +