Skip to content

add integration tests to the run-tests Github action #21

add integration tests to the run-tests Github action

add integration tests to the run-tests Github action #21

Workflow file for this run

---
name: Pull Request
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Extract dependent Pull Requests
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run pre-commit checks
run: |
set -ex
curl -sSL https://install.python-poetry.org | python3 -
poetry install --with test
poetry run pre-commit run -a --show-diff-on-failure
- name: Run integration tests
run: |
set -ex
sudo apt-get install inotify-tools
mkdir $HOME/.second-brain $HOME/Notes
cat > .env <<EOF
SRCDIR=$HOME/Notes
DSTDIR=$HOME/.second-brain
EOF
bash -x ./install-systemd-services.sh
cat > $HOME/Notes/langchain.md <<EOF
## References
- https://docs.langchain.com/docs/
- https://github.com/kyrolabs/awesome-langchain
Plan-and-Solve Prompting: Improving Zero-Shot
Chain-of-Thought Reasoning by Large Language Models
https://arxiv.org/pdf/2305.04091.pdf
EOF
sleep 10
echo "********************"
sudo journalctl -u sba-md
echo "********************"
sudo journalctl -u sba-txt
echo "********************"
RES=$(poetry run ./similarity.py "What is langchain?")
echo "$RES"
test -n "$RES"
check-all-dependencies-are-merged:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Check all dependent Pull Requests are merged
uses: depends-on/depends-on-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
check-unmerged-pr: true
...