Update _test.yml

This commit is contained in:
Aleksandr Statciuk 2022-10-19 23:31:58 +03:00
parent 7a355883d7
commit db327d4eb6

View file

@ -1,33 +1,12 @@
name: _test name: _test
on: on:
workflow_dispatch: workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs: jobs:
test: load:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: - run: npm run api:load
fetch-depth: 2 - run: npm install
- uses: tj-actions/changed-files@v19 - run: CHANNELS_PATH=sites/tvtv.us/tvtv.us_us.channels.xml npm run queue:create -- --max-clusters=1 --days=2
id: files - run: NODE_OPTIONS=--insecure-http-parser npm run cluster:load -- --timeout=30000 --cluster-id=1
with:
files: sites/**/*.config.js
- name: Set changed sites name
if: ${{ steps.files.outputs.any_changed == 'true' }}
id: sites
run: |
declare out
for i in ${{ steps.files.outputs.all_changed_files }}; do
out+="$(echo $i | cut -d'/' -f 2) "
done
echo "::set-output name=all_changed_sites::$(echo $out)"
- name: test
if: steps.files.outputs.any_changed == 'true'
run: |
npm install
npm test -- ${{ steps.sites.outputs.all_changed_sites }}