Commit f79de80 1 parent 3c66177 commit f79de80 Copy full SHA for f79de80
File tree 5 files changed +101
-3
lines changed
5 files changed +101
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : " CI"
3
+ concurrency : # Cancel any existing runs of this workflow for this same PR
4
+ group : " ${{ github.workflow }}-${{ github.ref }}"
5
+ cancel-in-progress : true
6
+ on : # yamllint disable-line
7
+ push :
8
+ branches :
9
+ - " main"
10
+ tags :
11
+ - " v*"
12
+ pull_request :
13
+
14
+ jobs :
15
+ shellcheck :
16
+ runs-on : " ubuntu-24.04"
17
+ steps :
18
+ - uses : " actions/checkout@v4"
19
+ - run : " shellcheck run.sh"
20
+
21
+ lint :
22
+ runs-on : " ubuntu-24.04"
23
+ steps :
24
+ - uses : " actions/checkout@v4"
25
+ - uses : " astral-sh/setup-uv@v5"
26
+ with :
27
+ version : " 0.6.6"
28
+ - run : " ./run.sh setup"
29
+ - run : " ./run.sh lint"
30
+
31
+ # tests:
32
+ # runs-on: "ubuntu-24.04"
33
+ # strategy:
34
+ # matrix:
35
+ # python-version:
36
+ # - "3.9"
37
+ # - "3.10"
38
+ # - "3.11"
39
+ # - "3.12"
40
+ # - "3.13"
41
+ # steps:
42
+ # - uses: "actions/checkout@v4"
43
+ # - uses: "astral-sh/setup-uv@v5"
44
+ # with:
45
+ # version: "0.6.6"
46
+ # python-version: "${{ matrix.python-version }}"
Original file line number Diff line number Diff line change 17
17
- " asdf install uv latest"
18
18
- " asdf global uv latest"
19
19
install :
20
- - " uv sync"
20
+ - " uv sync --no-dev "
21
21
post_install :
22
22
- " uv run ansible-galaxy collection install -r docs/requirements.yaml"
23
23
build :
Original file line number Diff line number Diff line change 1
1
---
2
2
extends : " default"
3
3
rules :
4
- comments : " enable"
4
+ comments :
5
+ min-spaces-from-content : 1
5
6
indentation :
6
7
spaces : 2
7
8
indent-sequences : true
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ markdown_extensions:
75
75
watch :
76
76
- " README.md"
77
77
78
- nav :
78
+ nav : # yamllint disable rule:indentation
79
79
- " index.md"
80
80
- " User Guide " : " user_guide.md"
81
81
- " Ansible Builtins " : " ansible.builtin"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o pipefail
5
+
6
+ # -----------------------------------------------------------------------------
7
+ # Helper functions start with _ and aren't listed in this script's help menu.
8
+ # -----------------------------------------------------------------------------
9
+
10
+ function _uvr {
11
+ uv run " $@ "
12
+ }
13
+
14
+ # -----------------------------------------------------------------------------
15
+
16
+ function setup {
17
+ echo " ---------- Installing python environment via uv."
18
+ _uvr uv sync
19
+ }
20
+
21
+ function lint {
22
+ echo " ---------- LINTING WITH RUFF"
23
+ _uvr ruff check mkdocs_ansible_collection
24
+ echo " ---------- CHECKING FORMATTING WITH RUFF"
25
+ _uvr ruff format --check --diff mkdocs_ansible_collection
26
+ echo " ---------- LINTING WITH YAMLLINT"
27
+ _uvr yamllint .
28
+ }
29
+
30
+ function autofix {
31
+ echo " ---------- RUFF CHECK AUTOFIX"
32
+ _uvr ruff check --fix mkdocs_ansible_collection
33
+ echo " ---------- FORMATTING WITH RUFF"
34
+ _uvr ruff format mkdocs_ansible_collection
35
+ }
36
+
37
+ # TODO: function test
38
+ # TODO: function docs
39
+
40
+ # -----------------------------------------------------------------------------
41
+
42
+ function help {
43
+ printf " %s <task> [args]\n\nTasks:\n" " ${0} "
44
+
45
+ compgen -A function | grep -v " ^_" | cat -n
46
+
47
+ printf " \nExtended help:\n Each task has comments for general usage\n"
48
+ }
49
+
50
+ TIMEFORMAT=$' \n Task completed in %3lR'
51
+ time " ${@:- help} "
You can’t perform that action at this time.
0 commit comments