Skip to content

Commit

Permalink
Run Content infra tests with each SDK build (#3369)
Browse files Browse the repository at this point in the history
* Run Content infra tests with each SDK build

* .

* changed name

* changed name fix

* test

* test

* pwd

* adding step

* commit sha

* pwd

* pip

* try again

* try again

* clone

* cd content

* .

* same step

* pwd

* -( poetry add)

* split

* .

* --

* poetry install --with ci

* git sha

* install

* try

* this

* no

* nisoy

* cd

* fixing path

* adding echo

* reverting changes to see if it can find the right commit

* removing assert

* checking directories to organize the pr

* change path

* updating url and getting the last commit of the current branch

* cd correct folder

* fixing dircetory path

* change poetry add

* running on sdk instead of content

* removing export

* adding checkout and fixing steps

* default 1 is the default

* improvent

* adding logs and env

* PYTHONPATH update

* pre-commit fix

* Apply suggestions from code review

Co-authored-by: dorschw <[email protected]>

* pre commit fixes

* cr notes

* string_to_bool deletion example

* undoing

* option raise error string_to_bool

* fix uninstalling

* reverting tools.py

* Delete tools.py

reverting

* revert tool change

* instsall in poetry env

* rename

* reorder

* `working-directory`

* cd

* rename steps

* pip uninstall

* uninstall -y

* test

* test

* undo test

* newline

---------

Co-authored-by: dorschw <[email protected]>
  • Loading branch information
maimorag and dorschw authored Jul 25, 2023
1 parent 204ae16 commit 1ef85b6
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/run-content-infrastructure-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test content infrastracture with current SDK branch
on: pull_request

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout SDK
uses: actions/checkout@v3

- name: Get commit hash
id: get-commit
run: echo commit=$(git rev-parse HEAD) >> $GITHUB_OUTPUT

- name: Checkout content
uses: actions/checkout@v3
with:
repository: demisto/content
path: content

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Setup Poetry
uses: Gr1N/setup-poetry@v8

- name: Install content
run: |
cd content
poetry install --with ci
- name: Uninstsall content version of SDK
run: |
cd content
poetry run pip uninstall demisto-sdk -y
- name: Install current SDK branch
run: |
cd content
poetry run pip install git+https://github.com/demisto/demisto-sdk@${{ steps.get-commit.outputs.commit }}
- name: Run content unit tests
env:
PYTHONPATH: ${{ github.workspace }}/content
run: |
cd content
poetry run pytest ./Tests/scripts/infrastructure_tests/ -v
poetry run pytest ./Tests/Marketplace/Tests/ -v
poetry run pytest ./Tests/tests -v
poetry run pytest ./Tests/private_build/tests -v
poetry run pytest Utils -v

0 comments on commit 1ef85b6

Please sign in to comment.