Skip to content

[RED-2503][RED-2506][RED-2507][RED-2509] Add zaf_sdk user agent to headers for requests #227

[RED-2503][RED-2506][RED-2507][RED-2509] Add zaf_sdk user agent to headers for requests

[RED-2503][RED-2506][RED-2507][RED-2509] Add zaf_sdk user agent to headers for requests #227

Workflow file for this run

name: main
on:
pull_request:
branches:
- master
jobs:
dependency-guard:
runs-on: ubuntu-latest
steps:
- uses: zendesk/checkout@v2
- name: Block dependencies from being added to package.json
run: |
IFS=' ' read -r allowed <<< "native-promise-only zendesk_app_framework_sdk"
dependencies=$(jq -r .dependencies package.json | jq 'keys' | jq .[] | sed 's/"//g')
for dep in "${dependencies[@]}"; do
if [[ ! ${allowed[*]} =~ (^|[[:space:]])"$dep"($|[[:space:]]) ]]; then
echo "::error ZAP SDK does not allow external dependencies, please remove \"${dep}\" dependency from package.json"
exit 1
fi
done
shell: bash
main-job:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- env:
TASK: lint
command: npm run lint
- env:
TASK: test
command: npm test
- env:
TASK: build
command: npm run build
steps:
- uses: zendesk/checkout@v2
- uses: zendesk/[email protected]
with:
node-version: 12.10.0
- name: install npm modules
run: |
npm install standardx
- name: ${{ matrix.env.TASK }}
run: TASK=${{ matrix.env.TASK }} ${{ matrix.command }}