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

Clickup integrations #1

Closed
wants to merge 205 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
e8a6e2a
Initiated Clickup Integration directory
oiadebayo Jun 30, 2024
91f3789
New Feature: ClickUp Integrations
oiadebayo Jul 3, 2024
845d38e
Update: updated clickup integration
oiadebayo Jul 3, 2024
a50a24a
Update client.py
oiadebayo Jul 4, 2024
0b3a96a
Update client.py
oiadebayo Jul 4, 2024
4089416
Update client.py
oiadebayo Jul 4, 2024
3701e3c
Fixes: Config and Client
oiadebayo Jul 4, 2024
a1c8540
Update port-app-config.yaml
oiadebayo Jul 4, 2024
9b29877
Update port-app-config.yaml
oiadebayo Jul 4, 2024
510028a
Update port-app-config.yaml
oiadebayo Jul 4, 2024
b06e724
Update port-app-config.yaml
oiadebayo Jul 4, 2024
78ea4d5
Update port-app-config.yaml
oiadebayo Jul 4, 2024
8f102b1
Update port-app-config.yaml
oiadebayo Jul 4, 2024
6359e28
Update port-app-config.yaml
oiadebayo Jul 4, 2024
e01ddea
Update port-app-config.yaml
oiadebayo Jul 4, 2024
8ca4ba3
Update port-app-config.yaml
oiadebayo Jul 4, 2024
db5e94d
Update port-app-config.yaml
oiadebayo Jul 4, 2024
f85d81a
Fixed all data mapping issues
oiadebayo Jul 4, 2024
a35693d
Merge branch 'port-labs:main' into clickup-integrations
oiadebayo Jul 4, 2024
133a58b
Changelog
oiadebayo Jul 4, 2024
ccaa55e
Merge branch 'clickup-integrations' of https://github.com/oiadebayo/o…
oiadebayo Jul 4, 2024
1ca3b3e
Fixes
oiadebayo Jul 4, 2024
7e2a39d
Deleting unnecessary files
oiadebayo Jul 4, 2024
7639166
Update port-app-config.yaml
oiadebayo Jul 4, 2024
1e9be3a
Update port-app-config.yaml
oiadebayo Jul 4, 2024
3baf0fa
Fixed date formats
oiadebayo Jul 4, 2024
e431398
Fixed headers function
oiadebayo Jul 5, 2024
2b4cfe3
Fixes
oiadebayo Jul 5, 2024
73adc6a
Update client.py
oiadebayo Jul 5, 2024
14e43f9
Update port-app-config.yaml
oiadebayo Jul 5, 2024
a005aea
Update port-app-config.yaml
oiadebayo Jul 5, 2024
d469593
Update port-app-config.yaml
oiadebayo Jul 5, 2024
886fccd
Update port-app-config.yaml
oiadebayo Jul 5, 2024
9bcabb1
Update port-app-config.yaml
oiadebayo Jul 5, 2024
4366e21
Update client.py
oiadebayo Jul 5, 2024
e60ae29
Update client.py
oiadebayo Jul 5, 2024
52d8390
Update main.py
oiadebayo Jul 5, 2024
4559381
Delete .gitignore
oiadebayo Jul 5, 2024
1abcca8
Revert "Delete .gitignore"
oiadebayo Jul 5, 2024
15a0e34
Update to Client and Main
oiadebayo Jul 5, 2024
22a4d5c
Update main.py
oiadebayo Jul 5, 2024
bad4f97
Lint fix
oiadebayo Jul 6, 2024
030f2f5
Merge branch 'clickup-integrations' of https://github.com/oiadebayo/o…
oiadebayo Jul 6, 2024
593a1d6
Update blueprints.json
oiadebayo Jul 6, 2024
263c60e
Lint Fix
oiadebayo Jul 6, 2024
ae5e7f7
Delete Dockerfile
oiadebayo Jul 6, 2024
c1eb2e9
Performed Requested Changes
oiadebayo Jul 14, 2024
f70e8bc
Fix Changelog
oiadebayo Jul 14, 2024
15603f6
Update port-app-config.yaml
oiadebayo Jul 14, 2024
520d76a
Merge branch 'main' into clickup-integrations
mk-armah Jul 17, 2024
42e9315
Merge branch 'main' into clickup-integrations
oiadebayo Jul 20, 2024
ffea6ef
changed create webhook event logic
jadenmyles Jul 20, 2024
6ce2bca
Supported Rate limiting
oiadebayo Jul 21, 2024
adfe6a4
Updated Rate limiting handling
oiadebayo Jul 21, 2024
0ccf204
Updated docstring
oiadebayo Jul 21, 2024
ef1f18b
Updated bounded rate liimit logic
oiadebayo Jul 21, 2024
f1d0561
- formatted blueprint to use spaces instead of tab to pass linting
jadenmyles Jul 22, 2024
1b3e9c1
Update integrations/clickup/.port/spec.yaml
oiadebayo Jul 22, 2024
2fc90b2
-removed quotes from objects in spec.yaml
jadenmyles Jul 22, 2024
f031c50
Requested Changes
oiadebayo Jul 22, 2024
a3d43fd
Merge branch 'main' into clickup-integrations
oiadebayo Jul 22, 2024
47383ad
Updating Ocean version
oiadebayo Jul 22, 2024
359ecba
Updating Ocean version
oiadebayo Jul 22, 2024
0d8c308
renamed bool in client init parameter
oiadebayo Jul 22, 2024
f10d46d
Added some comments in client
oiadebayo Jul 22, 2024
a171221
Corrected comments in client
oiadebayo Jul 22, 2024
816046a
Merge branch 'main' into clickup-integrations
oiadebayo Jul 23, 2024
6311cce
Merge branch 'main' into clickup-integrations
PeyGis Jul 25, 2024
f9e2a41
Updated port-ocean
oiadebayo Jul 25, 2024
f86bf1e
Added sonar-project.properties
oiadebayo Jul 25, 2024
ab5fcfa
Updated sonar-project.properties
oiadebayo Jul 25, 2024
58df414
Attending to PR comment
oiadebayo Jul 30, 2024
b9f14a2
Merge branch 'port-labs:main' into clickup-integrations
oiadebayo Jul 31, 2024
7fe5ada
Merge branch 'main' into clickup-integrations
mk-armah Aug 2, 2024
2036db8
Attended to review comments
oiadebayo Aug 4, 2024
918e919
Handled team inclusion
oiadebayo Aug 4, 2024
8733972
Fixed indentation
oiadebayo Aug 4, 2024
da6d36d
Merge branch 'main' into clickup-integrations
oiadebayo Aug 4, 2024
26699bc
Fix: property issue on blueprint and bumped ocean version
oiadebayo Aug 5, 2024
bbd3fc3
Merge branch 'main' into clickup-integrations
oiadebayo Aug 5, 2024
e944bf6
Committed suggestion to integrations/clickup/.port/spec.yaml
oiadebayo Aug 5, 2024
4a3f749
Committed suggestion to integrations/clickup/.port/spec.yaml
oiadebayo Aug 5, 2024
9dde507
Committed suggestion to integrations/clickup/main.py
oiadebayo Aug 5, 2024
e6d69ab
Applied suggestions in review comments
oiadebayo Aug 6, 2024
d9dc2f2
Merge branch 'main' into clickup-integrations
oiadebayo Aug 11, 2024
5138b5a
Update integrations/clickup/pyproject.toml
oiadebayo Aug 15, 2024
b1b3be0
Update integrations/clickup/CHANGELOG.md
oiadebayo Aug 15, 2024
c75a89e
Merge branch 'main' into clickup-integrations
oiadebayo Aug 16, 2024
14131cd
Merge branch 'main' into clickup-integrations
oiadebayo Aug 19, 2024
9f61ef0
Attended to reviewer's suggestions
oiadebayo Aug 21, 2024
2c0762d
Merge branch 'main' into clickup-integrations
oiadebayo Aug 21, 2024
81d7872
Merge branch 'port-labs:main' into clickup-integrations
oiadebayo Aug 21, 2024
531c103
Apply Ocean version 0.10.0 to all integrations (#937)
portmachineuser Aug 22, 2024
63b6f27
Update tj-actions/changed-files action to v44.5.7 (#930)
renovate[bot] Aug 22, 2024
45ad036
Merge branch 'main' into clickup-integrations
Tankilevitch Aug 24, 2024
00a0625
[Integration][Octopus] Added integration with support for Spaces Proj…
oiadebayo Aug 24, 2024
ec5b5fe
[GCP] Changed tf module for gcp integration (#921)
matan84 Aug 25, 2024
2b7377c
Update cookiecutter to integration standards
erikzaadi Aug 19, 2024
fcdcd09
[Framework] Refer to entity in upsert entity response (#943)
omby8888 Aug 26, 2024
0e1c3c9
Apply Ocean version 0.10.1 to all integrations (#944)
portmachineuser Aug 26, 2024
e82429d
[Framework] Remove entity key from upsert entity response (#950)
omby8888 Aug 26, 2024
c7c341e
Apply Ocean version 0.10.2 to all integrations (#951)
portmachineuser Aug 26, 2024
3432536
[CI] Update pr templates (#954)
Tankilevitch Aug 27, 2024
eca6353
[Integration][AWS] fix integration config class name (#955)
shalev007 Aug 28, 2024
feb449c
[Integration][Sonarqube] - Fix sonarQube client has no attributes met…
PeyGis Aug 28, 2024
cf0627f
[Integration][AWS] use the same event loop for all threads (#949)
shalev007 Aug 28, 2024
25d13a8
Apply Ocean version 0.10.3 to all integrations (#957)
portmachineuser Aug 28, 2024
9a5dbb7
[Framework] Fix bug search relation error unhashable dict (#956)
omby8888 Aug 28, 2024
7f1a07d
Apply Ocean version 0.10.4 to all integrations (#961)
portmachineuser Aug 28, 2024
60180f3
Merge branch 'main' into clickup-integrations
oiadebayo Aug 29, 2024
d94f0ed
Basic sync test support
erikzaadi Aug 29, 2024
5d7eda9
Added entities deletion by selector test case to pr core checklist (#…
omby8888 Aug 29, 2024
e5e6dd3
Merge branch 'main' into clickup-integrations
oiadebayo Aug 29, 2024
71c9f33
Bumped ocean version to ^0.10.4
oiadebayo Aug 29, 2024
0bb6780
Bump core to 0.10.5
erikzaadi Aug 29, 2024
a2af937
Merge branch 'main' into clickup-integrations
oiadebayo Aug 30, 2024
b0a5db2
Fixed CI issues
oiadebayo Aug 30, 2024
d91925a
Bumped ocean version to ^0.10.5
actions-user Aug 30, 2024
f7554e5
[Core] Fix error log on initialization (#965)
Tankilevitch Sep 1, 2024
fac709f
Add support for search identifier (#909)
talsabagport Sep 1, 2024
dfc1c13
Apply Ocean version 0.10.7 to all integrations (#973)
portmachineuser Sep 1, 2024
468af7f
[Datadog] Add custom tag names for metric filters (#962)
phalbert Sep 2, 2024
a0c6360
[GCP] Scale GCP Integration (#918)
mk-armah Sep 3, 2024
4919d9b
[Gitlab] Improvements to file kind (#942)
matan84 Sep 4, 2024
eb6ac81
[GCP] Add quota dependencies (#984)
matan84 Sep 4, 2024
86c0ccd
bumped version (#986)
matan84 Sep 4, 2024
c7c252c
[Core] Changed logs to not have info by default (#982)
matan84 Sep 4, 2024
71ad486
[Framework] Handle ReadTimeout errors (#983)
omby8888 Sep 4, 2024
96d408e
Apply Ocean version 0.10.8 to all integrations (#987)
portmachineuser Sep 4, 2024
fbcf4e7
[CI] Limit release integration `max-parallel` to 15 to avoid rate lim…
Tankilevitch Sep 4, 2024
4caa81d
[Integration][ADO] Bug Fix: Default mapping errors (#989)
oiadebayo Sep 5, 2024
bbc7bdf
[Gitlab] Added cases where no tasks should be ran together + empty pa…
matan84 Sep 5, 2024
bfd4767
[Integration][Snyk] Make Snyk Integration accept a list of organizati…
oiadebayo Sep 5, 2024
71bedda
[Core] Replaced StopAsyncIteration with a return to prevent errors wh…
mk-armah Sep 5, 2024
902a30d
Apply Ocean version 0.10.9 to all integrations (#992)
portmachineuser Sep 5, 2024
1cf51bb
[Integration][ADO] - Improve on Work Items ID Fetching and Logs (#993)
PeyGis Sep 6, 2024
c6dfd15
[Integration][ADO] - Ensure that no more than 20,000 work items are …
PeyGis Sep 6, 2024
9c3b74a
Load the default spec for testing helper
erikzaadi Sep 2, 2024
6887b09
Don't update official integrations spec for dev
erikzaadi Sep 2, 2024
854af64
Add fake integration
erikzaadi Sep 2, 2024
f815039
Fix integration release script
erikzaadi Sep 9, 2024
fcbb998
Bump fake integration
erikzaadi Sep 9, 2024
1869a3e
[Integration][GCP] Added an alternative for retrieving quota project …
mk-armah Sep 9, 2024
f9d5ef4
Fix invalid tf cloud link
erikzaadi Sep 10, 2024
bdb4dd7
Unify all `Makefile` using symlinks
erikzaadi Sep 10, 2024
32e9c00
Symlink `Makefile` for new integrations
erikzaadi Sep 10, 2024
9bc26af
Run all integration tests using local core
erikzaadi Sep 10, 2024
d6d0f82
Add docker layer cache
erikzaadi Sep 10, 2024
52e7b91
[Integration][OpsGenie] - Performance Improvement (#967)
PeyGis Sep 12, 2024
dc82a4f
[Core] Fix failure on initialization of actions in case of existence …
Tankilevitch Sep 12, 2024
f5c00a7
Apply Ocean version 0.10.10 to all integrations (#1013)
portmachineuser Sep 12, 2024
c424416
[Wiz] Filter issues by status (#998)
phalbert Sep 14, 2024
119cf98
[GoogleCloud] Real time improvements + Susbscription as specific reso…
matan84 Sep 15, 2024
d68ec25
Ignore junit files
erikzaadi Sep 15, 2024
5a9a57f
Update docker image labels to ensure new ghcr image permissions
erikzaadi Sep 15, 2024
b89ebba
Add smoke test using fake integration
erikzaadi Sep 15, 2024
f9fcfe3
Add ruff fixer :tm:
erikzaadi Sep 16, 2024
9f171dd
Merge branch 'main' into clickup-integrations
oiadebayo Sep 16, 2024
4b88729
Bumped ocean version
oiadebayo Sep 16, 2024
8fbaeb3
Bump to 0.10.11
erikzaadi Sep 17, 2024
1e25c45
Merge branch 'main' into clickup-integrations
oiadebayo Sep 17, 2024
40087d6
Bumped ocean version
oiadebayo Sep 17, 2024
1d75982
Multistep docker and move to alpine
erikzaadi Sep 17, 2024
09a4426
Revert "Multistep docker and move to alpine"
erikzaadi Sep 17, 2024
cdf2d0b
Fail on failing tests :facepalm:
erikzaadi Sep 17, 2024
d595fa9
Fix bump all versions to not remove beta/dev versions
erikzaadi Sep 17, 2024
5bfc316
Return fake to dev version and fix typo
erikzaadi Sep 17, 2024
2be1782
Bump integrations to ^0.10.11
erikzaadi Sep 17, 2024
2f09b26
Update fake integration tests according to new core standards
erikzaadi Sep 17, 2024
bc233d0
Merge branch 'main' into clickup-integrations
oiadebayo Sep 18, 2024
96ba3aa
Skip smoke tests
erikzaadi Sep 18, 2024
6ec6ed6
Merge branch 'main' into clickup-integrations
oiadebayo Sep 18, 2024
7142248
[Integration][GitLab] - Improve on GitOps push events (#1028)
PeyGis Sep 18, 2024
bdc1c4b
[Integration][GitLab] - Enable Existing Webhooks on Restarts (#1014)
PeyGis Sep 18, 2024
339d284
[Integration][SonarQube] - Handle 4xx errors gracefully (#1027)
PeyGis Sep 19, 2024
236ae72
[Core] Fix overriding of next resync status when cancelled due to sch…
Tankilevitch Sep 22, 2024
6bd1cee
Apply Ocean version 0.10.12 to all integrations (#1045)
portmachineuser Sep 22, 2024
82eb44d
Cleanup fixture for integrations should be more fault tolerant
erikzaadi Sep 22, 2024
b741b23
Return smoke test, cleanup detect-changes
erikzaadi Sep 22, 2024
50514c7
Reduce max parallel matrixes
erikzaadi Sep 22, 2024
a49d0b2
[AWS] Fix: Handle NoneType response in is_access_denied_exception (#1…
phalbert Sep 23, 2024
c3e2f02
[Integration][Gitlab] - Introduce Pagination and Run Code in Async (#…
PeyGis Sep 25, 2024
174af67
[Gitlab] Added verbosity to files (#1032)
matan84 Sep 25, 2024
0ec2807
Merge branch 'main' into clickup-integrations
oiadebayo Sep 26, 2024
34cfbd0
Updated ocean version
oiadebayo Sep 26, 2024
880b773
[Integration][AWS] - Fix ExpiredTokenException (#1041)
mk-armah Sep 26, 2024
b1786be
Add docker security scanner workflow
erikzaadi Sep 22, 2024
0d6eb14
Merge branch 'main' into clickup-integrations
oiadebayo Sep 26, 2024
434e0cd
[Core] Replace `pyjq` with `jq.py` (#1049)
Tankilevitch Sep 29, 2024
f1024c5
Bump to 0.11.0 (#1053)
Tankilevitch Sep 29, 2024
90562ed
Bump tj-actions/changed-files from 44 to 45 (#947)
dependabot[bot] Sep 30, 2024
06caa4a
Apply Ocean version 0.11.0 to all integrations (#1055)
portmachineuser Sep 30, 2024
a6a668f
[Integration][ServiceNow] Updated icons for servicenow blueprints (#1…
donald2 Sep 30, 2024
65496b1
Bump aquasecurity/trivy-action from 0.20.0 to 0.24.0 (#1056)
dependabot[bot] Sep 30, 2024
64f28fd
Move to alpine and improve security & smoke test
erikzaadi Sep 30, 2024
faacf8a
[Core] Fix stop iterator bug in jqpy (#1059)
Tankilevitch Oct 1, 2024
7473e89
Apply Ocean version 0.12.1 to all integrations (#1060)
portmachineuser Oct 1, 2024
cda3fb5
[Gitlab] Fix handling of real time events (#1051)
Tankilevitch Oct 2, 2024
71c41a9
[Integration][GitLab] - Fix Infinite Loop When Syncing Folders (#1061)
PeyGis Oct 3, 2024
ed86f24
[Core] | Added util for concurrency control (#1064)
mk-armah Oct 7, 2024
eca71f8
[Jenkins] Add build stages (#960)
phalbert Oct 7, 2024
6fbfcd3
Apply Ocean version 0.12.2 to all integrations (#1066)
portmachineuser Oct 8, 2024
d07916c
[Core] | Fix Changelog Version Step (#1067)
mk-armah Oct 8, 2024
ed902cf
Upgrade debian base image to improve security vulnerabilities
erikzaadi Oct 1, 2024
80a4359
Merge branch 'main' into clickup-integrations
oiadebayo Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Description

What -

Why -

How -

## Type of change
Expand All @@ -15,6 +17,40 @@ Please leave one option from the following and delete the rest:
- [ ] Non-breaking change (fix of existing functionality that will not change current behavior)
- [ ] Documentation (added/updated documentation)

<h4> All tests should be run against the port production environment(using a testing org). </h4>

### Core testing checklist

- [ ] Integration able to create all default resources from scratch
- [ ] Resync finishes successfully
- [ ] Resync able to create entities
- [ ] Resync able to update entities
- [ ] Resync able to detect and delete entities
- [ ] 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

- [ ] Integration able to create all default resources from scratch
- [ ] Resync able to create entities
- [ ] 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 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](#)

### Preflight checklist

- [ ] Handled rate limiting
- [ ] Handled pagination
- [ ] Implemented the code in async
- [ ] Support Multi account

## Screenshots

Include screenshots from your environment showing how the resources of the integration will look.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apply-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"

./scripts/bump-all.sh ^${{ steps.version.outputs.version }}
./scripts/bump-all.sh ${{ steps.version.outputs.version }}


- name: Open pull request
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,26 @@ jobs:
contents: read
needs: [prepare-matrix]
strategy:
max-parallel: 10
matrix:
integration: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
platform:
- linux/amd64
- linux/arm64
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: ${{ matrix.platform }}

- name: Prepare Docker images tags
id: prepare_tags
run: |
Expand All @@ -73,6 +82,7 @@ jobs:

dockerfile_path=integrations/_infra/Dockerfile
if test -e $folder/../Dockerfile; then
echo "Choosing a custom Dockerfile for ${{ matrix.integration }}"
dockerfile_path=$folder/../Dockerfile
fi
echo "dockerfile_path=$dockerfile_path" >> $GITHUB_OUTPUT
Expand All @@ -91,14 +101,31 @@ jobs:
echo "is_dev_version=false" >> $GITHUB_OUTPUT
fi

- name: Get used docker base image
id: get-docker-image
run: |
echo "base_image=$(cat ${{ steps.prepare_tags.outputs.dockerfile_path }} | head -n 1 | awk -F '=' '{print $2}' )" >> $GITHUB_OUTPUT

- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ matrix.integration }}-${{ steps.get-docker-image.outputs.base_image }}-${{ matrix.platform }}

- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: ${{ steps.prepare_tags.outputs.dockerfile_path }}
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }}
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.prepare_tags.outputs.tags }}
build-args: |
BUILD_CONTEXT=${{ steps.prepare_tags.outputs.context_dir }}
INTEGRATION_VERSION=${{ steps.prepare_tags.outputs.version }}

- name: Verify Built Image
run: |
docker run --platform ${{ matrix.platform }} --rm --entrypoint bash ${{ steps.prepare_tags.outputs.tags }} -c 'ocean version'
88 changes: 88 additions & 0 deletions .github/workflows/core-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: 🌊 Ocean Core Tests

on:
pull_request:
workflow_dispatch:

jobs:
detect-changes:
uses: ./.github/workflows/detect-changes-matrix.yml
test:
name: 🌊 Ocean Core Tests
needs: detect-changes
runs-on: ubuntu-latest
if: ${{ needs.detect-changes.outputs.core == 'true' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'

- name: Install dependencies
run: |
make install

- name: Unit Test Core
env:
PYTEST_ADDOPTS: --junitxml=junit/unit-test-results-ocean/core.xml
run: |
make test

- name: Build core for smoke test
run: |
make build

- name: Run fake integration for core test
env:
PORT_CLIENT_ID: ${{ secrets.PORT_CLIENT_ID }}
PORT_CLIENT_SECRET: ${{ secrets.PORT_CLIENT_SECRET }}
PORT_BASE_URL: ${{ secrets.PORT_BASE_URL }}
SMOKE_TEST_SUFFIX: ${{ github.run_id }}
run: |
./scripts/run-smoke-test.sh

- name: Smoke Test Core
env:
PYTEST_ADDOPTS: --junitxml=junit/smoke-test-results-ocean/core.xml
PORT_CLIENT_ID: ${{ secrets.PORT_CLIENT_ID }}
PORT_CLIENT_SECRET: ${{ secrets.PORT_CLIENT_SECRET }}
PORT_BASE_URL: ${{ secrets.PORT_BASE_URL }}
SMOKE_TEST_SUFFIX: ${{ github.run_id }}
run: |
make test/smoke

- name: Cleanup Smoke Test
env:
PYTEST_ADDOPTS: --junitxml=junit/smoke-test-results-ocean/core.xml
PORT_CLIENT_ID: ${{ secrets.PORT_CLIENT_ID }}
PORT_CLIENT_SECRET: ${{ secrets.PORT_CLIENT_SECRET }}
PORT_BASE_URL: ${{ secrets.PORT_BASE_URL }}
SMOKE_TEST_SUFFIX: ${{ github.run_id }}
run: |
make test/smoke

- name: Install current core for all integrations
run: |
echo "Installing local core for all integrations"
SCRIPT_TO_RUN='make install/local-core' make execute/all

- name: Test all integrations with current core
run: |
echo "Testing all integrations with local core"
SCRIPT_TO_RUN="PYTEST_ADDOPTS=--junitxml=${PWD}/junit/test-results-core-change/\`pwd | xargs basename\`.xml make test" make execute/all

- 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
fail_on_failure: true
3 changes: 2 additions & 1 deletion .github/workflows/create-new-sonarcloud-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0
- name: Get all changed integrations
id: changed-integrations
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
json: true
dir_names: true
Expand All @@ -42,6 +42,7 @@ jobs:
runs-on: ubuntu-latest
name: Create new project for integrations
strategy:
max-parallel: 5
matrix: ${{ fromJson(needs.pre-run.outputs.changed_integrations) }}
steps:
- name: Create integration variable
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/detect-changes-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Detect Changes
on:
workflow_call:
outputs:
matrix:
value: ${{ jobs.detect-changes.outputs.matrix }}
description: "Matrix of changed integrations / Ocean Core per git commit changes"
integrations:
description: "Matrix of changed integrations per git commit changes"
value: ${{ jobs.detect-changes.outputs.integrations }}
core:
value: ${{ jobs.detect-changes.outputs.core }}
description: "Determine if any core changes per git commit changes"

jobs:
detect-changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-all-matrix.outputs.matrix }}
integrations: ${{ steps.set-all-matrix.outputs.integrations }}
core: ${{ steps.set-all-matrix.outputs.core }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Get list of changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
dir_names: true
json: true
dir_names_max_depth: 2
escape_json: false
files_yaml: |
core:
- '!integrations/**'
- '!scripts/*'
- '!scripts/*'
- '!./*.md'
integrations:
- 'integrations/**'
- '!integrations/**/*.md'
- '!integrations/_infra/*'

- name: Set integrations and all matrix
id: set-all-matrix
run: |
INTEGRATIONS=$(node -e 'integrations=${{ steps.changed-files.outputs.integrations_all_changed_files }};console.log(JSON.stringify(integrations.map(integration => integration.split("/")[1])))')
HAS_CORE=${{ steps.changed-files.outputs.core_all_changed_files != '[]' }}
echo "Core changes : ${HAS_CORE}"
MATRIX=$(node -e "integrations=${INTEGRATIONS}; hasCore=${HAS_CORE}; console.log(JSON.stringify(hasCore ? integrations.concat(['.']) : integrations))")
echo "Integration changes : ${INTEGRATIONS}"
echo "All changes : ${MATRIX}"
echo "core=${HAS_CORE}" >> $GITHUB_OUTPUT
echo "integrations=${INTEGRATIONS}" >> $GITHUB_OUTPUT
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
Loading
Loading