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

Update .test-durations #3888

Closed
wants to merge 217 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
0118125
uts workflow
GuyAfik Nov 20, 2023
3ce90eb
basic workflow
GuyAfik Nov 20, 2023
49da8bc
--no-ansi
GuyAfik Nov 20, 2023
333e9c2
use source
GuyAfik Nov 20, 2023
636d45a
add pytest-split
GuyAfik Nov 20, 2023
a14b974
filter files
GuyAfik Nov 20, 2023
23b15ea
revert poetry
GuyAfik Nov 21, 2023
0ab4f50
install only pytest-split
GuyAfik Nov 21, 2023
128b21d
remove circle-ci cmd
GuyAfik Nov 21, 2023
6077842
test
GuyAfik Nov 21, 2023
a85079e
test
GuyAfik Nov 24, 2023
e5bfe7f
workflow
GuyAfik Nov 24, 2023
c6aabf6
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Nov 24, 2023
c8e616d
change group
GuyAfik Nov 24, 2023
76ff23d
revert poetry
GuyAfik Nov 24, 2023
312c8ca
pytest-split
GuyAfik Nov 24, 2023
ada0be6
try pytest-split
GuyAfik Nov 25, 2023
dfe46a9
continue on error of pytest
GuyAfik Nov 25, 2023
6ea228b
try with test-durations
GuyAfik Nov 25, 2023
e939097
no need test-durations
GuyAfik Nov 25, 2023
27d0143
comment out
GuyAfik Nov 25, 2023
84f1717
do not continue on error
GuyAfik Nov 25, 2023
3962ee5
more verbose pytest
GuyAfik Nov 27, 2023
c0c0d68
pre-commit
GuyAfik Nov 27, 2023
48c369d
upload artifacts even when failing
GuyAfik Nov 27, 2023
b8b03fa
echo exit code
GuyAfik Nov 27, 2023
5bc3939
test failure()
GuyAfik Nov 27, 2023
c99316a
coverage in case of failures
GuyAfik Nov 27, 2023
4090019
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Nov 27, 2023
45fea36
fix bug
GuyAfik Nov 27, 2023
e1f2ff8
fix
GuyAfik Nov 27, 2023
bf043ed
mark step as failed
GuyAfik Nov 27, 2023
3096a56
exit and fail
GuyAfik Nov 27, 2023
b06f23b
remove empty lines
GuyAfik Nov 27, 2023
74a26fa
try set +e
GuyAfik Nov 27, 2023
b71aec1
test
GuyAfik Nov 27, 2023
34c0940
test
GuyAfik Nov 28, 2023
9e12f9a
test
GuyAfik Nov 28, 2023
6fcb8b2
exit 1 test
GuyAfik Nov 28, 2023
9b43cbd
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Nov 30, 2023
8bd8653
test
GuyAfik Nov 30, 2023
8a48e93
test
GuyAfik Nov 30, 2023
cf73428
try with monkeypatch
GuyAfik Nov 30, 2023
30b93f7
print
GuyAfik Dec 1, 2023
98e2240
remove os after download test
GuyAfik Dec 1, 2023
7041959
try with container
GuyAfik Dec 1, 2023
cb20ad5
use fixture to unset env vars
GuyAfik Dec 1, 2023
c1033b8
try set level of caplog
GuyAfik Dec 1, 2023
f30d98b
test caplog
GuyAfik Dec 1, 2023
c2c7b1f
log level warning
GuyAfik Dec 1, 2023
502658d
print
GuyAfik Dec 2, 2023
ba91ed4
inside the warning
GuyAfik Dec 2, 2023
cf99cfd
prints
GuyAfik Dec 2, 2023
220e7c5
fix tests of [4]
GuyAfik Dec 2, 2023
7e88d8f
remove monkey patch
GuyAfik Dec 2, 2023
2401903
if always
GuyAfik Dec 2, 2023
89fb7ac
remove caplog
GuyAfik Dec 2, 2023
e46d191
try print pytest results
GuyAfik Dec 2, 2023
fcce1d8
right junit file
GuyAfik Dec 2, 2023
b8b89c2
refer to summary during run
GuyAfik Dec 2, 2023
f2d02e5
check if pytest tests have passed
GuyAfik Dec 2, 2023
c35946a
remove continue_on_error
GuyAfik Dec 2, 2023
82f0b8f
run id
GuyAfik Dec 2, 2023
e7a46bb
fix syntax issue
GuyAfik Dec 2, 2023
4927a96
try to fix test_create_id_set_flow_xpanse
GuyAfik Dec 2, 2023
6acb508
try to print skipped
GuyAfik Dec 2, 2023
158628c
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 4, 2023
15cf9b6
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 4, 2023
2258fde
add pytest-annotations
GuyAfik Dec 4, 2023
f77213f
try
GuyAfik Dec 8, 2023
b74192f
bla
GuyAfik Dec 8, 2023
96682d6
try now
GuyAfik Dec 8, 2023
8eb07fd
test
GuyAfik Dec 8, 2023
cca1641
give it a shot
GuyAfik Dec 8, 2023
fa3ec6e
try without shopt -u globstar
GuyAfik Dec 8, 2023
a1d46c0
add integration-tests
GuyAfik Dec 8, 2023
cf9d933
integration-tests-2
GuyAfik Dec 9, 2023
c469ae9
CI
GuyAfik Dec 9, 2023
8276515
try coverage report
GuyAfik Dec 9, 2023
872b19b
update artifact names
GuyAfik Dec 9, 2023
98ac6ed
coverage combine
GuyAfik Dec 9, 2023
08365c3
fix artifacts
GuyAfik Dec 9, 2023
31b4c8e
try without coverage
GuyAfik Dec 9, 2023
a115d0f
artifacts name add group string
GuyAfik Dec 9, 2023
2e5482e
update node version
GuyAfik Dec 9, 2023
ca70048
coverage all .coverage files
GuyAfik Dec 9, 2023
78ece71
node version 18
GuyAfik Dec 9, 2023
6685666
pre-commit working version
GuyAfik Dec 10, 2023
f3e4bae
base_validator tests rollback
GuyAfik Dec 10, 2023
414534b
node 16
GuyAfik Dec 10, 2023
d776d5c
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 10, 2023
92d7825
use upload-artifacts v3
GuyAfik Dec 10, 2023
a064b16
upload artifacts v3 integration tests
GuyAfik Dec 10, 2023
bbefaf8
test also content graph files
GuyAfik Dec 12, 2023
fce9d3c
try now
GuyAfik Dec 12, 2023
df833e0
try to fix tests
GuyAfik Dec 12, 2023
4f4d84d
get test durations
GuyAfik Dec 12, 2023
4f6f2dd
get store durations 2
GuyAfik Dec 12, 2023
9354582
get test-durations-3
GuyAfik Dec 13, 2023
9361027
test-durations-5
GuyAfik Dec 13, 2023
a219a96
test-durations-6
GuyAfik Dec 13, 2023
a6f79d7
cat .test_durations
GuyAfik Dec 13, 2023
2f5251d
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 13, 2023
7b333e7
lock
GuyAfik Dec 13, 2023
f4a7e7d
update test file name
GuyAfik Dec 13, 2023
6551e44
install also generat-unit-tests
GuyAfik Dec 13, 2023
9b79868
cat test-durations-2
GuyAfik Dec 13, 2023
4a39cd5
try now
GuyAfik Dec 13, 2023
a9844fb
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 13, 2023
0a5888a
test
GuyAfik Dec 13, 2023
5856b68
test durations
GuyAfik Dec 13, 2023
4c8bbeb
run pytest
GuyAfik Dec 13, 2023
5455a3c
revert parsers test
GuyAfik Dec 13, 2023
c46d206
pre-commit
GuyAfik Dec 13, 2023
7a992c0
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 14, 2023
05dc47f
add graph-tests job
GuyAfik Dec 14, 2023
945bb6a
fix name
GuyAfik Dec 14, 2023
7b6bd03
add callable workflow tests
GuyAfik Dec 15, 2023
d510561
use callable workflow in main.yml for tests
GuyAfik Dec 15, 2023
8e760b0
add master branch
GuyAfik Dec 15, 2023
98fe7d3
use ./
GuyAfik Dec 15, 2023
da36fdb
remove version
GuyAfik Dec 15, 2023
e9b7e05
add descriptions
GuyAfik Dec 15, 2023
fdfcf2f
add empty file:path
GuyAfik Dec 15, 2023
48cf349
add .input-string
GuyAfik Dec 15, 2023
382c863
try to define groups dynamically
GuyAfik Dec 15, 2023
ee9d849
default of all group
GuyAfik Dec 15, 2023
11545c4
default of all tests group
GuyAfik Dec 15, 2023
03f0ad0
try to fix syntax error
GuyAfik Dec 15, 2023
1f6cd9c
fix junit path
GuyAfik Dec 15, 2023
c7ce866
fix non-ignored files
GuyAfik Dec 15, 2023
1ff519c
try .length
GuyAfik Dec 15, 2023
7de3fc8
fix "
GuyAfik Dec 15, 2023
300a626
remove if for pytest
GuyAfik Dec 15, 2023
fc99fc6
try to fix splits
GuyAfik Dec 15, 2023
1227d83
try to fix legnth splits
GuyAfik Dec 15, 2023
206999b
use if to run pytest
GuyAfik Dec 15, 2023
02662ea
fix syntax error
GuyAfik Dec 15, 2023
f605924
fix syntax errors
GuyAfik Dec 15, 2023
4e1c423
fix "
GuyAfik Dec 15, 2023
1bc6fa7
fix syntax errors
GuyAfik Dec 15, 2023
d604ba8
try now
GuyAfik Dec 16, 2023
57158c4
check with *
GuyAfik Dec 16, 2023
b0c8bcb
test [0]
GuyAfik Dec 16, 2023
d131304
try now
GuyAfik Dec 16, 2023
517acf1
update
GuyAfik Dec 16, 2023
85ab97a
update name
GuyAfik Dec 16, 2023
c5f61cc
use mdx server only in unit
GuyAfik Dec 16, 2023
f96c38f
install node only for unit-tests
GuyAfik Dec 16, 2023
2b60eec
update
GuyAfik Dec 16, 2023
4d6b750
update if statement
GuyAfik Dec 16, 2023
ce90b38
add echo
GuyAfik Dec 16, 2023
111f5f0
try now
GuyAfik Dec 16, 2023
595f015
hardcode split
GuyAfik Dec 16, 2023
b5dba2c
remove node ifs
GuyAfik Dec 16, 2023
baa7c33
update job names
GuyAfik Dec 16, 2023
020280a
try to fix splits
GuyAfik Dec 16, 2023
621950e
try with split workaround
GuyAfik Dec 16, 2023
8845625
test
GuyAfik Dec 16, 2023
2ac0d76
split pytest
GuyAfik Dec 16, 2023
4d219d4
try now
GuyAfik Dec 16, 2023
9eb05e3
give path
GuyAfik Dec 16, 2023
0792cda
try to fix --ignore
GuyAfik Dec 16, 2023
7d23032
logs and comments
GuyAfik Dec 16, 2023
8a43c4f
ignore e2e tests as well
GuyAfik Dec 16, 2023
4ee14a9
check if neo4j is installed
GuyAfik Dec 16, 2023
c334969
update
GuyAfik Dec 16, 2023
8904d85
try use specific docker
GuyAfik Dec 16, 2023
21aa193
try 20.10.14
GuyAfik Dec 16, 2023
cf19064
try composite action
GuyAfik Dec 17, 2023
6af6c25
call it action.yml
GuyAfik Dec 17, 2023
6e55ae4
add shell: bash
GuyAfik Dec 17, 2023
e9cabe9
shell bash all steps
GuyAfik Dec 17, 2023
d4dc874
try now
GuyAfik Dec 17, 2023
d53e244
use composite actions in main.yml
GuyAfik Dec 17, 2023
20139e4
add test_summary_upload action
GuyAfik Dec 17, 2023
15ef067
update setup env name steps
GuyAfik Dec 17, 2023
a5da9d7
fix junit not found
GuyAfik Dec 17, 2023
1e24f7d
update echo
GuyAfik Dec 17, 2023
7c4ff14
fix names of setup env steps
GuyAfik Dec 17, 2023
667b73c
name fixes
GuyAfik Dec 17, 2023
01b0acb
update steps names
GuyAfik Dec 17, 2023
9942a2c
delete tests.yml
GuyAfik Dec 17, 2023
7ea1ed9
artifacts aligment
GuyAfik Dec 17, 2023
e4f4d57
add summary-display-options input
GuyAfik Dec 17, 2023
7599fcd
update composite actions names
GuyAfik Dec 17, 2023
256b2e0
pre-commit
GuyAfik Dec 17, 2023
2bcbc26
(All-Tests) group
GuyAfik Dec 17, 2023
161653b
update steps name
GuyAfik Dec 17, 2023
199867a
update artifacts folders names
GuyAfik Dec 17, 2023
0070961
fix invalid junit path
GuyAfik Dec 17, 2023
8fc35e0
update artifacts name without -
GuyAfik Dec 18, 2023
b6fddca
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 18, 2023
2e2dbea
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 18, 2023
7c171d3
try to mock import_graph
GuyAfik Dec 18, 2023
85d21c4
try to mock import_graph
GuyAfik Dec 18, 2023
2118dff
mock export_graph
GuyAfik Dec 18, 2023
57fa9e6
export graph and do not remove neo4j service
GuyAfik Dec 18, 2023
2534c6d
update pytest steps names
GuyAfik Dec 18, 2023
3e4e98e
test-durations add content-graph to ignore
GuyAfik Dec 18, 2023
747eea5
update steps names
GuyAfik Dec 19, 2023
8f79b29
add update test-durations workflow
GuyAfik Dec 19, 2023
c8ca79a
produce .test-durations with pytest-split
GuyAfik Dec 19, 2023
9705318
update main.yml to on-push
GuyAfik Dec 19, 2023
87c9088
make myself the reviewer
GuyAfik Dec 19, 2023
f9a373d
fix typo
GuyAfik Dec 19, 2023
0267b72
base = master
GuyAfik Dec 19, 2023
b4abbc1
Empty-Commit
GuyAfik Dec 19, 2023
90e4659
remove cancel
GuyAfik Dec 19, 2023
1fb5a57
revert irrelevant changes
GuyAfik Dec 19, 2023
43c3775
run all tests for uts
GuyAfik Dec 21, 2023
7eb5b1b
try without pytest-split
GuyAfik Dec 21, 2023
d17fad0
update-test-durations ignore e2e
GuyAfik Dec 21, 2023
3bf0e2c
Merge branch 'master' of github.com:demisto/demisto-sdk into uts_to_g…
GuyAfik Dec 21, 2023
cf81e14
with pytest-split
GuyAfik Dec 21, 2023
40b0d7d
update .test-durations
GuyAfik Dec 21, 2023
26f3df3
Merge 40b0d7df77680c2cde8ec79c1b8552fa882b1199 into c34587ab4908e0d66…
GuyAfik Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/actions/setup_environment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Setup environment for demisto-sdk'
description: 'Setup environment for every demisto-sdk workflow job'
author: 'Demisto-SDK'

inputs:
python-version:
required: true
type: string
description: "The python version"
node-version:
required: false
type: string
default: "16"
description: "The node version to install"


runs:
using: 'composite'
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Setup Poetry
run: |
sudo curl -sSL https://install.python-poetry.org | python3 -
poetry --version
poetry check --lock
poetry install -E generate-unit-tests
shell: bash

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: Install npm
run: |
npm install
echo $(echo '{"node_version": "'$(node --version)'","npm_list":'$(npm list --json)'}') > node_versions_info.json
shell: bash
55 changes: 55 additions & 0 deletions .github/actions/test_summary_upload/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Test Summary Upload'
description: 'Prints out a summary for all the tests of the demisto-sdk'
author: 'Demisto-SDK'

inputs:
python-version:
required: true
type: string
description: "The python version"
artifacts_folder_name:
required: false
type: string
description: "The folder name to save artifacts"
group:
required: false
type: string
default: "All-Tests"
description: "The group of the pytest-split"
summary-display-options:
required: false
type: string
description: "The test-summary display options"
default: fsEX # show all failed and skipped tests


runs:
using: 'composite'
steps:
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifacts_folder_name }}-artifacts-python(${{ inputs.python-version }})-group(${{ inputs.group }})
path: |
${{ inputs.artifacts_folder_name }}
node_versions_info.json
.coverage
- name: Print Summary of pytest results in workflow summary
if: always()
uses: pmeier/pytest-results-action@main
with:
path: ${{ inputs.artifacts_folder_name }}/junit.xml
summary: true
display-options: ${{ inputs.summary-display-options }}
fail-on-empty: true
- name: Check if ${{ inputs.artifacts_folder_name }} have passed
shell: bash
if: always()
run: |
if [[ "$PYTEST_EXIT_CODE" -ne 0 ]]; then
echo "There are ${{ inputs.artifacts_folder_name }} that failed, pytest finished with exit code $PYTEST_EXIT_CODE, to see the ${{ inputs.artifacts_folder_name }} summary refer to https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.pull_request.number }}"
else
echo "All ${{ inputs.artifacts_folder_name }} have passed, congratulations!"
fi
exit $PYTEST_EXIT_CODE
149 changes: 149 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: CI - On Push

on:
push:
branches:
- master
pull_request:
branches:
- "**"

concurrency:
group: tests-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}


jobs:
unit-tests:
name: Unit Tests / Python ${{ matrix.python-version }} (${{ matrix.group }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
group: [ 1, 2, 3, 4, 5 ]
fail-fast: false
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python ${{ matrix.python-version }} (${{ matrix.group }}) - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: ${{ matrix.python-version }}

- name: Run Unit Tests
run: |
source "$(poetry env info --path)/bin/activate"

# Due to race conditions in the tests bringing up and down the node server, have the server available
# For all the tests.
node demisto_sdk/commands/common/markdown_server/mdx-parse-server.js &
node_pid=$!

mkdir unit-tests
poetry run pytest -v . --ignore={demisto_sdk/commands/init/templates,demisto_sdk/tests/integration_tests,demisto_sdk/commands/content_graph,tests_end_to_end} --cov=demisto_sdk --cov-report=html:unit-tests/coverage --junitxml=unit-tests/junit.xml --splits 5 --group ${{ matrix.group }} || pytest_exit_code=$?
echo "PYTEST_EXIT_CODE=$pytest_exit_code" >> $GITHUB_ENV

kill $node_pid

- name: Python ${{ matrix.python-version }} (${{ matrix.group }}) - Test Summary Upload
uses: ./.github/actions/test_summary_upload
with:
python-version: ${{ matrix.python-version }}
artifacts_folder_name: unit-tests
group: ${{ matrix.group }}


integration-tests:
name: Integration Tests / Python ${{ matrix.python-version }} (All-Tests)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
fail-fast: false
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python ${{ matrix.python-version }} - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: ${{ matrix.python-version }}

- name: Run Integration Tests
run: |
source "$(poetry env info --path)/bin/activate"

mkdir integration-tests
poetry run pytest -v demisto_sdk/tests/integration_tests --cov=demisto_sdk --cov-report=html:integration-tests/coverage --junitxml=integration-tests/junit.xml || pytest_exit_code=$?
echo "PYTEST_EXIT_CODE=$pytest_exit_code" >> $GITHUB_ENV

exit $pytest_exit_code

- name: Python ${{ matrix.python-version }} - Test Summary Upload
uses: ./.github/actions/test_summary_upload
with:
python-version: ${{ matrix.python-version }}
artifacts_folder_name: integration-tests

graph-tests:
name: Graph Tests / Python ${{ matrix.python-version }} (All-Tests)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
fail-fast: false
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python ${{ matrix.python-version }} - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: ${{ matrix.python-version }}

- name: Run Graph Tests
run: |
source "$(poetry env info --path)/bin/activate"

mkdir graph-tests
poetry run pytest -v demisto_sdk/commands/content_graph --cov=demisto_sdk --cov-report=html:graph-tests/coverage --junitxml=graph-tests/junit.xml || pytest_exit_code=$?
echo "PYTEST_EXIT_CODE=$pytest_exit_code" >> $GITHUB_ENV

- name: Python ${{ matrix.python-version }} - Test Summary Upload
uses: ./.github/actions/test_summary_upload
with:
python-version: ${{ matrix.python-version }}
artifacts_folder_name: graph-tests

coverage:
needs: [unit-tests, integration-tests, graph-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Run coverage
run: |
pip install coverage
coverage combine **/.coverage
coverage report
coverage xml
- name: Coveralls
uses: coverallsapp/github-action@v2
64 changes: 64 additions & 0 deletions .github/workflows/update-test-durations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update .test-durations file

on:
# schedule:
# - cron: "0 8 * * 0" # Run every two weeks on Sunday at 8 AM UTC
push:
branches:
- master
pull_request:
branches:
- "**"


jobs:
update-test-durations:
name: Update .test-durations file
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python ${{ matrix.python-version }} (${{ matrix.group }}) - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: ${{ matrix.python-version }}

- name: Run Unit Tests
run: |
source "$(poetry env info --path)/bin/activate"

# Due to race conditions in the tests bringing up and down the node server, have the server available
# For all the tests.
node demisto_sdk/commands/common/markdown_server/mdx-parse-server.js &
node_pid=$!

mkdir unit-tests
poetry run pytest . --ignore={demisto_sdk/commands/init/templates,demisto_sdk/tests/integration_tests,demisto_sdk/commands/content_graph,tests_end_to_end} --store-durations --junitxml=unit-tests/junit.xml || pytest_exit_code=$
echo "PYTEST_EXIT_CODE=$pytest_exit_code" >> $GITHUB_ENV

kill $node_pid

- name: Update .test-durations
run: |
git status
git add .test_durations
git status
git commit -m "Update .test-durations" || true
git push origin HEAD:refs/heads/update-test-durations

- name: Create Draft PR
run: |
gh pr create --base master --head update-test-durations --title "Update .test-durations" --body "This PR updates the .test-durations file." --draft --reviewer GuyAfik
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Python ${{ matrix.python-version }} (${{ matrix.group }}) - Test Summary Upload
uses: ./.github/actions/test_summary_upload
with:
python-version: ${{ matrix.python-version }}
artifacts_folder_name: unit-tests
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ repos:
- cachetools==5.3.0 ; python_version >= "3.8" and python_version < "3.11"
- certifi==2022.12.7 ; python_version >= "3.8" and python_version < "3.11"
- cffi==1.15.1 ; python_version >= "3.8" and python_version < "3.11"
- cfgv==3.3.1 ; python_version >= "3.8" and python_version < "3.11"
- chardet==5.1.0 ; python_version >= "3.8" and python_version < "3.11"
- charset-normalizer==3.1.0 ; python_version >= "3.8" and python_version < "3.11"
- click==8.1.3 ; python_version >= "3.8" and python_version < "3.11"
Expand All @@ -51,9 +52,11 @@ repos:
- demisto-py==3.2.10 ; python_version >= "3.8" and python_version < "3.11"
- dictdiffer==0.9.0 ; python_version >= "3.8" and python_version < "3.11"
- dictor==0.1.11 ; python_version >= "3.8" and python_version < "3.11"
- distlib==0.3.6 ; python_version >= "3.8" and python_version < "3.11"
- docker==5.0.3 ; python_version >= "3.8" and python_version < "3.11"
- docopt==0.6.2 ; python_version >= "3.8" and python_version < "3.11"
- exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11"
- filelock==3.12.0 ; python_version >= "3.8" and python_version < "3.11"
- flatten-dict==0.4.2 ; python_version >= "3.8" and python_version < "3.11"
- freezegun==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
- future==0.18.3 ; python_version >= "3.8" and python_version < "3.11"
Expand All @@ -74,6 +77,7 @@ repos:
- grpcio-status==1.48.2 ; python_version >= "3.8" and python_version < "3.11"
- grpcio==1.59.2 ; python_version >= "3.8" and python_version < "3.11"
- humanfriendly==10.0 ; python_version >= "3.8" and python_version < "3.11"
- identify==2.5.24 ; python_version >= "3.8" and python_version < "3.11"
- idna==3.4 ; python_version >= "3.8" and python_version < "3.11"
- imagesize==1.4.1 ; python_version >= "3.8" and python_version < "3.11"
- importlib-resources==5.12.0 ; python_version >= "3.8" and python_version < "3.11"
Expand All @@ -93,6 +97,7 @@ repos:
- neo4j==5.14.1 ; python_version >= "3.8" and python_version < "3.11"
- networkx==2.8.8 ; python_version >= "3.8" and python_version < "3.11"
- nltk==3.8.1 ; python_version >= "3.8" and python_version < "3.11"
- nodeenv==1.7.0 ; python_version >= "3.8" and python_version < "3.11"
- ordered-set==4.1.0 ; python_version >= "3.8" and python_version < "3.11"
- orjson==3.8.11 ; python_version >= "3.8" and python_version < "3.11"
- packaging==23.1 ; python_version >= "3.8" and python_version < "3.11"
Expand All @@ -102,6 +107,7 @@ repos:
- pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9"
- platformdirs==3.5.0 ; python_version >= "3.8" and python_version < "3.11"
- pluggy==1.0.0 ; python_version >= "3.8" and python_version < "3.11"
- pre-commit==3.5.0 ; python_version >= "3.8" and python_version < "3.11"
- prettytable==3.7.0 ; python_version >= "3.8" and python_version < "3.11"
- proto-plus==1.22.3 ; python_version >= "3.8" and python_version < "3.11"
- protobuf==3.19.6 ; python_version >= "3.8" and python_version < "3.11"
Expand Down Expand Up @@ -176,6 +182,7 @@ repos:
- tzlocal==4.3 ; python_version >= "3.8" and python_version < "3.11"
- ujson==5.7.0 ; python_version >= "3.8" and python_version < "3.11"
- urllib3==1.26.15 ; python_version >= "3.8" and python_version < "3.11"
- virtualenv==20.23.0 ; python_version >= "3.8" and python_version < "3.11"
- vulture==2.7 ; python_version >= "3.8" and python_version < "3.11"
- wcmatch==8.4.1 ; python_version >= "3.8" and python_version < "3.11"
- wcwidth==0.2.6 ; python_version >= "3.8" and python_version < "3.11"
Expand Down