Create _test.yml

This commit is contained in:
Aleksandr Statciuk 2022-05-10 15:04:53 +03:00
parent 4112cdb378
commit 1ca1175492

29
.github/workflows/_test.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: _test
on:
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:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: tj-actions/changed-files@v19
id: files
with:
files: sites/**/*.config.js
- uses: actions/setup-node@v2
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
with:
node-version: '14'
cache: 'npm'
- name: test
if: steps.files.outputs.any_changed == 'true'
run: |
npm install
npm test