2020-12-01 10:02:31 +00:00
|
|
|
name: Test Supported Distributions
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
|
2022-04-16 02:26:56 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-01 10:02:31 +00:00
|
|
|
jobs:
|
2022-07-02 13:00:17 +00:00
|
|
|
smoke-tests:
|
2021-10-05 18:34:51 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Checkout repository
|
2024-04-27 10:46:03 +00:00
|
|
|
uses: actions/checkout@v4.1.4
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Check scripts in repository are executable
|
|
|
|
run: |
|
|
|
|
IFS=$'\n';
|
|
|
|
for f in $(find . -name '*.sh'); do if [[ ! -x $f ]]; then echo "$f is not executable" && FAIL=1; fi ;done
|
|
|
|
unset IFS;
|
|
|
|
# If FAIL is 1 then we fail.
|
|
|
|
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Spell-Checking
|
|
|
|
uses: codespell-project/actions-codespell@master
|
|
|
|
with:
|
|
|
|
ignore_words_file: .codespellignore
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Get editorconfig-checker
|
|
|
|
uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Run editorconfig-checker
|
|
|
|
run: editorconfig-checker
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Check python code formatting with black
|
|
|
|
uses: psf/black@stable
|
|
|
|
with:
|
|
|
|
src: "./test"
|
|
|
|
options: "--check --diff --color"
|
2021-10-05 18:34:51 +00:00
|
|
|
|
2020-12-01 10:02:31 +00:00
|
|
|
distro-test:
|
|
|
|
if: github.event.pull_request.draft == false
|
|
|
|
runs-on: ubuntu-latest
|
2022-07-02 13:00:17 +00:00
|
|
|
needs: smoke-tests
|
2020-12-01 10:02:31 +00:00
|
|
|
strategy:
|
2022-07-25 20:57:30 +00:00
|
|
|
fail-fast: false
|
2020-12-01 10:02:31 +00:00
|
|
|
matrix:
|
2022-09-25 16:03:44 +00:00
|
|
|
distro:
|
2022-09-29 17:13:23 +00:00
|
|
|
[
|
|
|
|
debian_10,
|
|
|
|
debian_11,
|
2023-06-10 21:03:43 +00:00
|
|
|
debian_12,
|
2022-09-29 17:13:23 +00:00
|
|
|
ubuntu_20,
|
|
|
|
ubuntu_22,
|
2023-05-24 20:54:47 +00:00
|
|
|
ubuntu_23,
|
2022-09-29 17:13:23 +00:00
|
|
|
centos_8,
|
2022-10-16 22:36:56 +00:00
|
|
|
centos_9,
|
2024-01-28 15:56:57 +00:00
|
|
|
fedora_38,
|
2023-11-07 21:24:34 +00:00
|
|
|
fedora_39,
|
2022-09-29 17:13:23 +00:00
|
|
|
]
|
2020-12-01 10:02:31 +00:00
|
|
|
env:
|
2020-12-01 10:09:16 +00:00
|
|
|
DISTRO: ${{matrix.distro}}
|
|
|
|
steps:
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Checkout repository
|
2024-04-27 10:46:03 +00:00
|
|
|
uses: actions/checkout@v4.1.4
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Set up Python 3.10
|
2024-04-21 16:24:45 +00:00
|
|
|
uses: actions/setup-python@v5.1.0
|
2022-09-25 16:03:44 +00:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-12-05 22:13:24 +00:00
|
|
|
- name: Install wheel
|
|
|
|
run: pip install wheel
|
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Install dependencies
|
2022-12-05 22:13:24 +00:00
|
|
|
run: pip install -r test/requirements.txt
|
2022-09-26 08:40:39 +00:00
|
|
|
|
2022-09-25 16:03:44 +00:00
|
|
|
- name: Test with tox
|
|
|
|
run: tox -c test/tox.${DISTRO}.ini
|