Merged #1351 PR: Run tests in docker images (#1370)

* Added images to DockerFile

* Docker test

* Docker.yml changes, longer timeout and naming changes

* typo in run command

* added matrix for docker workflow 'testing'

* typo in matrix

* git fixes

* docker testing

* Changed stage build'testing'

* testing docker change

* Run images in seperate containers

* docker files added

* reverted Dockerfile

* Removed files from the index (now ignored)

* Docker test, changed build to pull

* Update comments in Ubuntu and Debian dockerfiles

* added main service back

* Reducing common code

* Condensing docker-compose.yml

* Revert docker-compose.yml changes

* Removing matrix from docker-compose.yml

* removing target images from docker-compose

* Added dockerfile-unitTests

* Condensing docker-compose.yml

* Reverting compose changes

* Merged Dockerfiles and fixed image names

* removed .DS_Store

* Revert pycharm_debugging.md

* Testing remove

* Testing remove

* Remove ds files

* Add files via upload

* Add files via upload

* Docker changes

* Docker workflow changes

* Update Dockerfile

* Update docker-compose.yml

* shorten docker-compose.yml by using yaml anchors

* fix docker-compose.yml

Co-authored-by: Kevin Nguyen <u7315258@anu.edu.au>
Co-authored-by: Filip Mazur <110886132+mazfil@users.noreply.github.com>
Co-authored-by: KevinN318 <110944398+KevinN318@users.noreply.github.com>
Co-authored-by: Filip Mazur <u6934917@anu.edu.au>
This commit is contained in:
Disconnect3d 2022-11-11 07:23:02 +01:00 committed by GitHub
parent 05e3d058b7
commit dd6454065d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 8 deletions

View File

@ -3,13 +3,26 @@ on: [push, pull_request]
jobs:
docker:
strategy:
fail-fast: false
matrix:
images: [ubuntu18.04, ubuntu20.04, ubuntu22.04, debian10, debian11]
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker-compose build main
- name: Cache for docker images
uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
with:
path: ~/.cache/images
key: ${{ matrix.images }}-cache-images
- name: Run the tests in Docker
run: docker-compose run main ./tests.sh
- name: Docker Build ${{ matrix.images }}
run: docker-compose pull ${{ matrix.images }}
- name: Test on ${{ matrix.images }}
run: docker-compose run ${{ matrix.images }} ./tests.sh

View File

@ -7,7 +7,9 @@
# For development, mount the directory so the host changes are reflected into container:
# docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v `pwd`:/pwndbg pwndbg bash
#
FROM ubuntu:20.04
ARG image=ubuntu:20.04
FROM $image
WORKDIR /pwndbg

View File

@ -1,6 +1,6 @@
version: "3.8"
services:
main:
main: &base-spec
build: .
volumes:
- .:/pwndbg
@ -9,3 +9,38 @@ services:
- seccomp:unconfined
cap_add:
- SYS_PTRACE
ubuntu18.04:
<<: *base-spec
build:
context: .
args:
image: ubuntu:18.04
ubuntu20.04:
<<: *base-spec
build:
context: .
args:
image: ubuntu:20.04
ubuntu22.04:
<<: *base-spec
build:
context: .
args:
image: ubuntu:22.04
debian10:
<<: *base-spec
build:
context: .
args:
image: debian:10
debian11:
<<: *base-spec
build:
context: .
args:
image: debian:11