Skip to content

Added .yml file for webapp to run test on making the pr. #12

Added .yml file for webapp to run test on making the pr.

Added .yml file for webapp to run test on making the pr. #12

name: Run Tests on Pull Request
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.base.ref }}
- name: Fetch pull request changes
run: |
git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge:pr
git checkout pr
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install gdb
run: |
sudo apt-get update
sudo apt-get install -y gdb
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r gdbui_server/requirements.txt
- name: Run tests on changes
run: |
python -m unittest discover -s gdbui_server -p 'flask_test.py'