Skip to content

Commit

Permalink
Add GH workflow to run unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rotemreiss committed Jan 17, 2023
1 parent 660c4db commit 1d5db30
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI Tests

# Controls when the workflow will run
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.inputs.base }}
filters: |
backend:
- 'leaktopus_backend/**'
frontend:
- 'leaktopus_frontend/**'
unit-tests:
needs: [ changes ]
if: ${{ needs.changes.outputs.backend == 'true' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
cache: 'pip' # caching pip dependencies

- name: Install dependencies
run: pip install -r leaktopus_backend/requirements.txt

- name: Run unit tests
run: |
pytest --ignore leaktopus_backend/leaktopus/tests leaktopus_backend/leaktopus
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
import pytest

@pytest.mark.skip(reason="TBC")
def test_should_filter_potential_leak_sources_successfully():
assert False
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,15 @@ def test_should_save_potential_leak_source_page_with_multiple_iols_support(
)


@pytest.mark.skip(reason="TBC")
def test_should_raise_exception_when_multiple_non_acknowledged_leaks_matched_for_save(
factory_leak_service,
ignore_pattern_provider_mock,
potential_leak_source_filter_mock,
page_results,
potential_leak_source_scan_status_provider_mock,
):
pass
assert False


def test_should_support_multiple_search_queries(
Expand Down

0 comments on commit 1d5db30

Please sign in to comment.