name: Samples Zapier

on:
  push:
    branches:
      - 'samples/client/petstore/zapier/**'
  pull_request:
    paths:
      - 'samples/client/petstore/zapier/**'

jobs:
  validate:
    name: Test zapier generation
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        sample:
          - samples/client/petstore/zapier
    steps:
    - uses: actions/checkout@v3
    - name: Setup node
      uses: actions/setup-node@v3
    - name: Install dependencies
      working-directory: ${{ matrix.sample }}
      run: |
        npm install
    - name: Validate
      working-directory: ${{ matrix.sample }}
      run: node index.js