-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduces basic tests and updates the dependency installation process (
#39) * Create basic tests * Manage dependencies with poetry * Update CI for lint * Update .gitignore * Drop supports for EOL Python 3.7 * Update lint.sh * Add options for installing development dependencies in install.sh * Fix lint * Update CI for lint * Use loose comparsion for vermin * Make sure tmux will run with TERM=screen-256color * Add docker related files to run the tests * Create tests.sh * Create CI for running tests * Update tests.sh * Add CI for building * Update job name
- Loading branch information
Showing
16 changed files
with
721 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
__pycache__ | ||
.venv | ||
.gdb_history | ||
.DS_Store | ||
.mypy_cache | ||
.ruff_cache | ||
gdbinit-gep | ||
geprc.py | ||
!example/gdbinit-gep | ||
!example/geprc.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and run GEP | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y git gdb python3 python3-pip python3-venv tmux | ||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf | ||
~/.fzf/install --all | ||
./install.sh | ||
- name: Check GEP is running normally | ||
run: | | ||
gdb --version | ||
export PATH=~/.fzf/bin:$PATH | ||
tmux new-session -d -s check gdb -q | ||
sleep 5 | ||
OUTPUT=$(tmux capture-pane -p -t check) | ||
echo $OUTPUT | ||
grep -q "GEP is running" <(echo "$OUTPUT") | ||
! grep -q "Install fzf for better experience with GEP" <(echo "$OUTPUT") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Test GEP on different platforms | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
images: [ubuntu22.04] # TODO: Add more targets here | ||
|
||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker Build ${{ matrix.images }} | ||
run: docker-compose build ${{ matrix.images }} | ||
|
||
- name: Test on ${{ matrix.images }} | ||
run: docker-compose run ${{ matrix.images }} ./tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ARG image | ||
FROM $image | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
python3 \ | ||
python3-pip \ | ||
python3-venv \ | ||
tmux \ | ||
git \ | ||
gdb \ | ||
curl \ | ||
wget \ | ||
vim && \ | ||
curl -sSL https://install.python-poetry.org | python3 - && \ | ||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && \ | ||
~/.fzf/install --all | ||
|
||
ENV PATH="/root/.fzf/bin:/root/.local/bin:${PATH}" | ||
|
||
COPY . /root/.local/share/GEP | ||
|
||
WORKDIR /root/.local/share/GEP | ||
|
||
RUN ./install.sh -d && \ | ||
poetry install --with dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: "3.8" | ||
|
||
services: | ||
base: &base-spec | ||
build: . | ||
platform: linux/amd64 | ||
security_opt: | ||
- seccomp:unconfined | ||
cap_add: | ||
- SYS_PTRACE | ||
|
||
ubuntu22.04: | ||
<<: *base-spec | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
image: ubuntu:22.04 | ||
|
||
ubuntu20.04: | ||
<<: *base-spec | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
image: ubuntu:20.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.