diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2fb2df4fd7..5d00d3aea4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: branches: [ master, develop ] jobs: - build: + test: runs-on: ubuntu-18.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -21,13 +21,7 @@ jobs: cp ./extras/docker/.dockerignore ./ - name: build Docker image - run: docker build -t andresriancho/w3af:test-action - - - test: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 + run: docker build -t andresriancho/w3af:test-action . - name: run w3af tests - run: docker run -it andresriancho/w3af:test-action pytest + run: docker run andresriancho/w3af:test-action pytest diff --git a/extras/docker/Dockerfile b/extras/docker/Dockerfile index 5ef573caf7..e679151f66 100644 --- a/extras/docker/Dockerfile +++ b/extras/docker/Dockerfile @@ -79,6 +79,9 @@ RUN sed 's/apt-get/apt-get -y/g' -i /tmp/w3af_dependency_install.sh RUN sed 's/pip install/pip install --upgrade/g' -i /tmp/w3af_dependency_install.sh RUN /tmp/w3af_dependency_install.sh +# install test dependencies +RUN pip install -r w3af/tests/requirements.txt + # Compile the py files into pyc in order to speed-up w3af's start RUN python -m compileall -q .