Skip to content

Commit

Permalink
chore: add more validations
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 17, 2023
1 parent aa65b3f commit 98e74fa
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/actions/tests/pre-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,45 @@ runs:
id: checkout
uses: actions/checkout@v4

- name: Check for pre-commit in requirements
run: |
if ! grep -q "pre-commit" ./requirements.txt; then
echo "pre-commit not found in requirements.txt" >&2
exit 1
fi
- name: Check for black in requirements
run: |
if ! grep -q "black" ./requirements.txt; then
echo "black not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8 in requirements
run: |
if ! grep -q "flake8" ./requirements.txt; then
echo "flake8 not found in requirements.txt" >&2
exit 1
fi
- name: Check for flake8-coding in requirements
run: |
if ! grep -q "flake8-coding" ./requirements.txt; then
echo "flake8-coding not found in requirements.txt" >&2
exit 1
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
# see: https://pre-commit.ci/lite.html
- name: pre-commit ci
id: pre-commit-ci
Expand Down
28 changes: 28 additions & 0 deletions .github/actions/tests/python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,34 @@ runs:
exit 1
fi
- name: Check for openai in requirements
run: |
if ! grep -q "openai" ./requirements.txt; then
echo "openai not found in requirements.txt" >&2
exit 1
fi
- name: Check for langchain in requirements
run: |
if ! grep -q "langchain" ./requirements.txt; then
echo "langchain not found in requirements.txt" >&2
exit 1
fi
- name: Check for langchain-experimental in requirements
run: |
if ! grep -q "langchain-experimental" ./requirements.txt; then
echo "langchain-experimental not found in requirements.txt" >&2
exit 1
fi
- name: Check for pinecone-client in requirements
run: |
if ! grep -q "pinecone-client" ./requirements.txt; then
echo "pinecone-client not found in requirements.txt" >&2
exit 1
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/tests/terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ runs:
exit 1
fi
- name: Verify Terraform is installed
run: |
if ! command -v terraform &> /dev/null
then
echo "Terraform could not be found"
exit 1
fi
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down

0 comments on commit 98e74fa

Please sign in to comment.