Skip to content

Commit

Permalink
Merge branch 'main' into clickup-integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
oiadebayo authored Aug 29, 2024
2 parents 60180f3 + 5d7eda9 commit e5e6dd3
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 105 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Please leave one option from the following and delete the rest:
- [ ] Scheduled resync able to abort existing resync and start a new one
- [ ] Tested with at least 2 integrations from scratch
- [ ] Tested with Kafka and Polling event listeners
- [ ] Tested deletion of entities that don't pass the selector


### Integration testing checklist
Expand All @@ -38,7 +39,7 @@ Please leave one option from the following and delete the rest:
- [ ] Resync able to update entities
- [ ] Resync able to detect and delete entities
- [ ] Resync finishes successfully
- [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the `examples` folder in the integration directory.
- [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the `examples` folder in the integration directory.
- [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
- [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected
- [ ] Docs PR link [here](#)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ jobs:
- name: Test
working-directory: ${{ matrix.folder != '.' && format('integrations/{0}', matrix.folder) || '.' }}
env:
PYTEST_ADDOPTS: --junitxml=junit/test-results-${{ matrix.folder != '.' && format('integrations/{0}', matrix.folder) || '.' }}.xml
PYTEST_ADDOPTS: --junitxml=junit/test-results-${{ matrix.folder != '.' && format('integrations/{0}', matrix.folder) || 'ocean/core' }}.xml
run: |
make test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: ${{ always() }}
with:
report_paths: '**/junit/test-results-**/*.xml'
include_passed: true
require_tests: true
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ define deactivate_virtualenv
fi
endef

.SILENT: install install/all test/all lint build run new test clean bump/integrations bump/single-integration
.SILENT: install install/all test/all lint build run new test test/watch clean bump/integrations bump/single-integration


# Install dependencies
Expand All @@ -56,7 +56,15 @@ install:

test/all: test
$(ACTIVATE) && \
pytest --import-mode=importlib -n auto ./port_ocean/tests ./integrations/*/tests
for dir in $(wildcard $(CURDIR)/integrations/*); do \
count=$$(find $$dir -type f -name '*.py' -not -path "*/venv/*" | wc -l); \
if [ $$count -ne 0 ]; then \
echo "Testing $$dir"; \
cd $$dir; \
$(MAKE) test || exit_code=$$?; \
cd ../..; \
fi; \
done;

install/all: install
exit_code=0; \
Expand Down Expand Up @@ -89,7 +97,13 @@ new:
$(ACTIVATE) && poetry run ocean new ./integrations --public

test:
$(ACTIVATE) && pytest -vv -n auto --ignore-glob=./integrations/* ./port_ocean/tests
$(ACTIVATE) && pytest

test/watch:
$(ACTIVATE) && \
pytest \
--color=yes \
-f

clean:
@find . -name '.venv' -type d -exec rm -rf {} \;
Expand Down
Loading

0 comments on commit e5e6dd3

Please sign in to comment.