Add GitHub Actions support (#809)

pull/816/head
Arusekk 5 years ago committed by GitHub
parent 15b11c7b15
commit ce2266e95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save