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

gha configurations #65

Merged
merged 15 commits into from
Oct 12, 2023
Merged
53 changes: 53 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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

[win_lgpo.py]
indent_size = unset

[win_lgpo_ash.py]
indent_size = unset

[*.adml]
indent_size = unset
trim_trailing_whitespace = unset

[*.admx]
indent_size = unset
trim_trailing_whitespace = unset

[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
end_of_line = unset
insert_final_newline = unset

12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
# Maintain dependencies for dockerfiles
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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@86222127307c7f827e141bbc35cf0efb0e611648
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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@84885d2116bdcaab046d6bf927127bb58cb74ae8
strategy:
matrix:
os_version:
- windows-2019
- windows-2022
salt_state:
- ash-windows
salt_pillar_root:
- ./tests/pillar/test-windows-main
with:
salt-os-version: ${{ matrix.os_version }}
salt-state: ${{ matrix.salt_state }}
salt-pillar-root: ${{ matrix.salt_pillar_root }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ $RECYCLE.BIN/
*.msm
*.msp

# tardigrade-ci
.tardigrade-ci
tardigrade-ci/

# =========================
# Operating System Files
# =========================
Expand Down
15 changes: 15 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .pydocstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pydocstyle]
ignore = D
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM plus3it/tardigrade-ci:0.24.7
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 3 additions & 1 deletion _modules/win_lgpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
- struct
- salt.utils.win_reg
"""

# pylint: skip-file

import csv
import ctypes
import glob
Expand Down Expand Up @@ -5057,7 +5060,6 @@ def _parse_xml(adm_file):

# Lowercase all the keys
with salt.utils.files.fopen(adm_file, "rb") as rfh:

encoding = "utf-8"
raw = rfh.read()
try:
Expand Down
Loading