mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Better wording and test with color
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
17ec88d96f
commit
bf5fffaca7
76
.github/workflows/test.yml
vendored
76
.github/workflows/test.yml
vendored
@ -12,33 +12,28 @@ jobs:
|
|||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout repository
|
||||||
name: Checkout repository
|
uses: actions/checkout@v3.0.2
|
||||||
uses: actions/checkout@v3.0.2
|
- name: Check scripts in repository are executable
|
||||||
-
|
run: |
|
||||||
name: Check scripts in repository are executable
|
IFS=$'\n';
|
||||||
run: |
|
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
||||||
IFS=$'\n';
|
unset IFS;
|
||||||
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
# If FAIL is 1 then we fail.
|
||||||
unset IFS;
|
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
||||||
# If FAIL is 1 then we fail.
|
- name: Spell-Checking
|
||||||
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
uses: codespell-project/actions-codespell@master
|
||||||
-
|
with:
|
||||||
name: Spell-Checking
|
ignore_words_file: .codespellignore
|
||||||
uses: codespell-project/actions-codespell@master
|
- name: Get editorconfig-checker
|
||||||
with:
|
uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
|
||||||
ignore_words_file: .codespellignore
|
- name: Run editorconfig-checker
|
||||||
-
|
run: editorconfig-checker
|
||||||
name: Get editorconfig-checker
|
- name: Check python code formatting with black
|
||||||
uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
|
uses: psf/black@stable
|
||||||
-
|
with:
|
||||||
name: Run editorconfig-checker
|
src: "./test"
|
||||||
run: editorconfig-checker
|
options: "--check --diff --color"
|
||||||
-
|
|
||||||
name: Run black python code formatter
|
|
||||||
uses: psf/black@stable
|
|
||||||
with:
|
|
||||||
src: "./test"
|
|
||||||
|
|
||||||
distro-test:
|
distro-test:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
@ -47,21 +42,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
distro: [debian_10, debian_11, ubuntu_20, ubuntu_22, centos_8, fedora_34]
|
distro:
|
||||||
|
[debian_10, debian_11, ubuntu_20, ubuntu_22, centos_8, fedora_34]
|
||||||
env:
|
env:
|
||||||
DISTRO: ${{matrix.distro}}
|
DISTRO: ${{matrix.distro}}
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout repository
|
||||||
name: Checkout repository
|
uses: actions/checkout@v3.0.2
|
||||||
uses: actions/checkout@v3.0.2
|
- name: Set up Python 3.10
|
||||||
-
|
uses: actions/setup-python@v4.2.0
|
||||||
name: Set up Python 3.10
|
with:
|
||||||
uses: actions/setup-python@v4.2.0
|
python-version: "3.10"
|
||||||
with:
|
- name: Install dependencies
|
||||||
python-version: '3.10'
|
run: pip install -r test/requirements.txt
|
||||||
-
|
- name: Test with tox
|
||||||
name: Install dependencies
|
run: tox -c test/tox.${DISTRO}.ini
|
||||||
run: pip install -r test/requirements.txt
|
|
||||||
-
|
|
||||||
name: Test with tox
|
|
||||||
run: tox -c test/tox.${DISTRO}.ini
|
|
||||||
|
Loading…
Reference in New Issue
Block a user