mirror of https://github.com/pwndbg/pwndbg.git
Add GitHub Actions support (#809)
parent
15b11c7b15
commit
ce2266e95d
@ -0,0 +1,37 @@
|
||||
name: Lint
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache for pip
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ matrix.os }}-cache-pip
|
||||
|
||||
- name: Set up Python 2.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 2.7
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install linters
|
||||
run: |
|
||||
pip install isort future
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
futurize --all-imports --stage1 --print-function --write --unicode-literals pwndbg tests
|
||||
git diff-index --quiet HEAD -- pwndbg tests
|
||||
isort --check-only --diff --recursive pwndbg tests
|
||||
python2.7 -m py_compile ida_script.py $(git ls-files 'pwndbg/*.py')
|
||||
python3 -m py_compile $(git ls-files 'pwndbg/*.py')
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
name: Unit tests
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache for pip
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ matrix.os }}-cache-pip
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
./setup.sh --user
|
||||
|
||||
- name: Python version info
|
||||
run: |
|
||||
echo 'GDB py:'
|
||||
gdb --batch --quiet --nx --nh --ex 'py import sys; print(sys.version)'
|
||||
echo 'Installed py:'
|
||||
python -V
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
PWNDBG_TRAVIS_TEST_RUN=1 ./tests.sh
|
||||
Loading…
Reference in new issue