-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (50 loc) · 1.41 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Validate and run tests
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch: {}
workflow_call:
secrets:
PINECONE_API_KEY:
required: true
PINECONE_ENVIRONMENT:
required: true
jobs:
basic-hygiene:
name: Linting, formatting, etc
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Prettier
run: npm run format
- name: Check for prettier changes
run: |
git diff --exit-code >/dev/null 2>&1
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "Prettier changes detected. Please run 'npm run format' and commit the changes."
exit 1
fi
- name: ESLint
run: npm run lint
run-integration-tests:
name: Integration tests
runs-on: macos-latest
permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Run integration tests
uses: ./.github/actions/integrationTests
with:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}