@@ -3,11 +3,16 @@ name: "CI"
33concurrency : # Cancel any existing runs of this workflow for this same PR
44 group : " ${{ github.workflow }}-${{ github.ref }}"
55 cancel-in-progress : true
6+ <<<<<<< HEAD
67on : # yamllint disable
8+ =======
9+ on : # yamllint disable-line rule:truthy rule:comments
10+ >>>>>>> b02ca70 (Cookie initialy baked by NetworkToCode Cookie Drift Manager Tool)
711 push :
812 branches :
913 - " main"
1014 - " develop"
15+ <<<<<<< HEAD
1116 tags :
1217 - " v*"
1318 pull_request : ~
@@ -259,3 +264,173 @@ jobs:
259264 env :
260265 SLACK_WEBHOOK_URL : " ${{ secrets.SLACK_WEBHOOK_URL }}"
261266 SLACK_WEBHOOK_TYPE : " INCOMING_WEBHOOK"
267+ =======
268+ pull_request : ~
269+
270+ env :
271+ INVOKE_DIFFSYNC_IMAGE_NAME : " diffsync"
272+ INVOKE_DIFFSYNC_IMAGE_VER : " latest"
273+
274+ jobs :
275+ ruff-format :
276+ runs-on : " ubuntu-latest"
277+ env :
278+ INVOKE_DIFFSYNC_LOCAL : " True"
279+ steps :
280+ - name : " Check out repository code"
281+ uses : " actions/checkout@v4"
282+ - name : " Setup environment"
283+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
284+ with :
285+ poetry-version : " 2.1.3"
286+ - name : " Linting: ruff format"
287+ run : " poetry run invoke ruff --action format"
288+ ruff-lint :
289+ runs-on : " ubuntu-latest"
290+ env :
291+ INVOKE_DIFFSYNC_LOCAL : " True"
292+ steps :
293+ - name : " Check out repository code"
294+ uses : " actions/checkout@v4"
295+ - name : " Setup environment"
296+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
297+ with :
298+ poetry-version : " 2.1.3"
299+ - name : " Linting: ruff"
300+ run : " poetry run invoke ruff --action lint"
301+ check-docs-build :
302+ runs-on : " ubuntu-latest"
303+ env :
304+ INVOKE_DIFFSYNC_LOCAL : " True"
305+ steps :
306+ - name : " Check out repository code"
307+ uses : " actions/checkout@v4"
308+ - name : " Setup environment"
309+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
310+ with :
311+ poetry-version : " 2.1.3"
312+ poetry-install-options : " --only dev,docs"
313+ - name : " Check Docs Build"
314+ run : " poetry run invoke build-and-check-docs"
315+ poetry :
316+ runs-on : " ubuntu-latest"
317+ env :
318+ INVOKE_DIFFSYNC_LOCAL : " True"
319+ steps :
320+ - name : " Check out repository code"
321+ uses : " actions/checkout@v4"
322+ - name : " Setup environment"
323+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
324+ with :
325+ poetry-version : " 2.1.3"
326+ - name : " Checking: poetry lock file"
327+ run : " poetry run invoke lock --check"
328+ yamllint :
329+ runs-on : " ubuntu-latest"
330+ env :
331+ INVOKE_DIFFSYNC_LOCAL : " True"
332+ steps :
333+ - name : " Check out repository code"
334+ uses : " actions/checkout@v4"
335+ - name : " Setup environment"
336+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
337+ with :
338+ poetry-version : " 2.1.3"
339+ - name : " Linting: yamllint"
340+ run : " poetry run invoke yamllint"
341+ check-in-docker :
342+ needs :
343+ - " ruff-format"
344+ - " ruff-lint"
345+ - " poetry"
346+ - " yamllint"
347+ runs-on : " ubuntu-latest"
348+ strategy :
349+ fail-fast : true
350+ matrix :
351+ python-version : ["3.10", "3.13"]
352+ env :
353+ INVOKE_DIFFSYNC_PYTHON_VER : " ${{ matrix.python-version }}"
354+ steps :
355+ - name : " Check out repository code"
356+ uses : " actions/checkout@v4"
357+ - name : " Setup environment"
358+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
359+ with :
360+ poetry-version : " 2.1.3"
361+ - name : " Get image version"
362+ run : " echo INVOKE_DIFFSYNC_IMAGE_VER=`poetry version -s`-py$${{ matrix.python-version }} >> $GITHUB_ENV"
363+ - name : " Set up Docker Buildx"
364+ id : " buildx"
365+ uses : " docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
366+ - name : " Build"
367+ uses : " docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25" # v5.4.0
368+ with :
369+ builder : " ${{ steps.buildx.outputs.name }}"
370+ context : " ./"
371+ push : false
372+ load : true
373+ tags : " ${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}:${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}"
374+ file : " ./Dockerfile"
375+ cache-from : " type=gha,scope=${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}-${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}-py${{ matrix.python-version }}"
376+ cache-to : " type=gha,scope=${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}-${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}-py${{ matrix.python-version }}"
377+ build-args : |
378+ PYTHON_VER=${{ env.PYTHON_VER }}
379+ - name : " Linting: Pylint"
380+ run : " poetry run invoke pylint"
381+ pytest :
382+ needs :
383+ - " check-in-docker"
384+ strategy :
385+ fail-fast : true
386+ matrix :
387+ python-version : ["3.10", "3.11", "3.12", "3.13"]
388+ runs-on : " ubuntu-latest"
389+ env :
390+ INVOKE_DIFFSYNC_PYTHON_VER : " ${{ matrix.python-version }}"
391+ steps :
392+ - name : " Check out repository code"
393+ uses : " actions/checkout@v4"
394+ - name : " Setup environment"
395+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
396+ with :
397+ poetry-version : " 2.1.3"
398+ - name : " Get image version"
399+ run : " echo INVOKE_DIFFSYNC_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
400+ - name : " Set up Docker Buildx"
401+ id : " buildx"
402+ uses : " docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
403+ - name : " Build"
404+ uses : " docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25" # v5.4.0
405+ with :
406+ builder : " ${{ steps.buildx.outputs.name }}"
407+ context : " ./"
408+ push : false
409+ load : true
410+ tags : " ${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}:${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}"
411+ file : " ./Dockerfile"
412+ cache-from : " type=gha,scope=${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}-${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}-py${{ matrix.python-version }}"
413+ cache-to : " type=gha,scope=${{ env.INVOKE_DIFFSYNC_IMAGE_NAME }}-${{ env.INVOKE_DIFFSYNC_IMAGE_VER }}-py${{ matrix.python-version }}"
414+ build-args : |
415+ PYTHON_VER=${{ env.PYTHON_VER }}
416+ - name : " Run Tests"
417+ run : " poetry run invoke pytest"
418+ changelog :
419+ if : >
420+ contains(fromJson('["develop"]'), github.base_ref) &&
421+ (github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
422+ runs-on : " ubuntu-latest"
423+ steps :
424+ - name : " Check out repository code"
425+ uses : " actions/checkout@v4"
426+ with :
427+ fetch-depth : " 0"
428+ - name : " Setup environment"
429+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
430+ with :
431+ poetry-version : " 2.1.3"
432+ - name : " Check for changelog entry"
433+ run : |
434+ git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
435+ poetry run towncrier check --compare-with origin/${{ github.base_ref }}
436+ >>>>>>> b02ca70 (Cookie initialy baked by NetworkToCode Cookie Drift Manager Tool)
0 commit comments