Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added github test action #18619

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is tests workflow for GitHub Actions

name: Tests

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
test:
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: prepare for Docker image build
run: |
cp ./extras/docker/Dockerfile ./
cp ./extras/docker/.dockerignore ./

- name: build Docker image
run: docker build -t andresriancho/w3af:test-action .
timeout-minutes: 10

- name: run w3af tests
run: docker run andresriancho/w3af:test-action pytest --ignore=w3af/core/ui/ --ignore=src/
timeout-minutes: 15
3 changes: 3 additions & 0 deletions extras/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

Expand Down
2 changes: 1 addition & 1 deletion w3af/core/controllers/chrome/proxy/tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from w3af.core.data.url.extended_urllib import ExtendedUrllib


pytestmarks = pytest.mark.deprecated
pytestmark = pytest.mark.deprecated


class TestProxy(unittest.TestCase):
Expand Down