mirror of
https://github.com/vee1e/GDB-UI.git
synced 2026-09-02 03:07:15 +00:00
40 lines
946 B
YAML
40 lines
946 B
YAML
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'
|