mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +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
36
.github/workflows/test.yml
vendored
36
.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
|
||||||
name: Check scripts in repository are executable
|
|
||||||
run: |
|
run: |
|
||||||
IFS=$'\n';
|
IFS=$'\n';
|
||||||
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
||||||
unset IFS;
|
unset IFS;
|
||||||
# If FAIL is 1 then we fail.
|
# If FAIL is 1 then we fail.
|
||||||
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
||||||
-
|
- name: Spell-Checking
|
||||||
name: Spell-Checking
|
|
||||||
uses: codespell-project/actions-codespell@master
|
uses: codespell-project/actions-codespell@master
|
||||||
with:
|
with:
|
||||||
ignore_words_file: .codespellignore
|
ignore_words_file: .codespellignore
|
||||||
-
|
- name: Get editorconfig-checker
|
||||||
name: Get editorconfig-checker
|
|
||||||
uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
|
uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
|
||||||
-
|
- name: Run editorconfig-checker
|
||||||
name: Run editorconfig-checker
|
|
||||||
run: editorconfig-checker
|
run: editorconfig-checker
|
||||||
-
|
- name: Check python code formatting with black
|
||||||
name: Run black python code formatter
|
|
||||||
uses: psf/black@stable
|
uses: psf/black@stable
|
||||||
with:
|
with:
|
||||||
src: "./test"
|
src: "./test"
|
||||||
|
options: "--check --diff --color"
|
||||||
|
|
||||||
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
|
||||||
name: Set up Python 3.10
|
|
||||||
uses: actions/setup-python@v4.2.0
|
uses: actions/setup-python@v4.2.0
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: "3.10"
|
||||||
-
|
- name: Install dependencies
|
||||||
name: Install dependencies
|
|
||||||
run: pip install -r test/requirements.txt
|
run: pip install -r test/requirements.txt
|
||||||
-
|
- name: Test with tox
|
||||||
name: Test with tox
|
|
||||||
run: tox -c test/tox.${DISTRO}.ini
|
run: tox -c test/tox.${DISTRO}.ini
|
||||||
|
Loading…
Reference in New Issue
Block a user