diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2e514aa --- /dev/null +++ b/.editorconfig @@ -0,0 +1,36 @@ +# see http://editorconfig.org +root = true + +[*] +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 +tab_width = 4 + +[*.md] +trim_trailing_whitespace = false + +[*.py] +indent_size = 4 + +[go.mod] +indent_style = tab +indent_size = 1 + +[*.go] +indent_style = tab +indent_size = 1 + +[Makefile] +indent_style = tab +indent_size = 1 + +[Makefile.*] +indent_style = tab +indent_size = 1 + +[LICENSE] +indent_size = none diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..653a660 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" + # Maintain dependencies for dockerfiles + - package-ecosystem: docker + directory: / + schedule: + interval: weekly + groups: + docker: + patterns: + - "*" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..adf38b6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,11 @@ +name: Run lint and static analyis checks +on: + pull_request: + +concurrency: + group: lint-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + lint: + uses: plus3it/actions-workflows/.github/workflows/lint.yml@93a9326e07945e5441d0fadef735563290edd729 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..66c7836 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Run salt tests +on: + pull_request: + +concurrency: + group: test-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + windows: + uses: plus3it/actions-workflows/.github/workflows/test-salt-windows.yml@93a9326e07945e5441d0fadef735563290edd729 + strategy: + matrix: + os_version: + - windows-2019 + - windows-2022 + salt_state: + - ntp-client-windows + salt_pillar_root: + - ./tests/pillar/test-main + with: + salt-os-version: ${{ matrix.os_version }} + salt-state: ${{ matrix.salt_state }} + salt-pillar-root: ${{ matrix.salt_pillar_root }} diff --git a/.gitignore b/.gitignore index 96374c4..23539b5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,10 @@ $RECYCLE.BIN/ *.msm *.msp +# tardigrade-ci +.tardigrade-ci +tardigrade-ci/ + # Windows shortcuts *.lnk diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..0c77e19 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,15 @@ +pull_request_rules: + - name: approve dependabot pull requests + conditions: + - author=dependabot[bot] + actions: + review: + type: APPROVE + + - name: merge dependabot pull requests + conditions: + - author=dependabot[bot] + - "#approved-reviews-by>=1" + actions: + merge: + method: merge diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..24432c6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM plus3it/tardigrade-ci:0.24.13 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..634033f --- /dev/null +++ b/Makefile @@ -0,0 +1 @@ +include $(shell test -f .tardigrade-ci || curl -sSL -o .tardigrade-ci "https://raw.githubusercontent.com/plus3it/tardigrade-ci/master/bootstrap/Makefile.bootstrap"; echo .tardigrade-ci) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4f919c5..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: '{branch}-{build}' -build: off -environment: - global: - SALT_FILEROOT: '%APPVEYOR_BUILD_FOLDER%' - SALT_STATE: ntp-client-windows - SALT_URL: https://repo.saltstack.com/windows/Salt-Minion-2016.11.8-AMD64-Setup.exe - matrix: - - SALT_PILLARROOT: '%APPVEYOR_BUILD_FOLDER%\tests\pillar\test-empty' - - SALT_PILLARROOT: '%APPVEYOR_BUILD_FOLDER%\tests\pillar\test-main' - -init: - - ps: echo $env:SALT_PILLARROOT -install: - - ps: | - $null = ` - (new-object net.webclient).DownloadFile(${env:SALT_URL}, ` - "${env:temp}\salt-minion.exe") - - ps: | - $null = ` - Start-Process -FilePath "${env:temp}\salt-minion.exe" ` - -ArgumentList "/S" -NoNewWindow -PassThru -Wait - - ps: C:\salt\salt-call.bat --versions-report - -test_script: - - ps: | - C:\salt\salt-call.bat --local --retcode-passthrough ` - --log-file-level debug ` - --file-root="${env:SALT_FILEROOT}" ` - --pillar-root="${env:SALT_PILLARROOT}" ` - state.show_sls ` - "${env:SALT_STATE}" - - ps: | - C:\salt\salt-call.bat --local --retcode-passthrough ` - --log-file-level debug ` - --file-root="${env:SALT_FILEROOT}" ` - --pillar-root="${env:SALT_PILLARROOT}" ` - state.sls ` - "${env:SALT_STATE}" ` - mock=True - -on_failure: - - ps: C:\salt\salt-call.bat --local grains.items - - ps: dir "env:" - - ps: get-content C:\salt\var\log\salt\* - -### To enable remote debugging uncomment this (also, see: http://www.appveyor.com/docs/how-to/rdp-to-build-worker): -# on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))