Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test.yml « workflows « .github - github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 318cfcc403b8b935bcd2ae0bfc39114dbd75d479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test Supported Distributions

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

permissions:
  contents: read

jobs:
  smoke-tests:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
    -
      name: Checkout repository
      uses: actions/checkout@v3.0.2
    -
      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!"
    -
      name: Spell-Checking
      uses: codespell-project/actions-codespell@master
      with:
        ignore_words_file: .codespellignore
    -
      name: Get editorconfig-checker
      uses: editorconfig-checker/action-editorconfig-checker@main # tag v1.0.0 is really out of date
    -
      name: Run editorconfig-checker
      run: editorconfig-checker


  distro-test:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    needs: smoke-tests
    strategy:
      fail-fast: false
      matrix:
        distro: [debian_10, debian_11, ubuntu_20, ubuntu_22, centos_8, fedora_34]
    env:
      DISTRO: ${{matrix.distro}}
    steps:
    -
      name: Checkout repository
      uses: actions/checkout@v3.0.2
    -
      name: Set up Python 3.8
      uses: actions/setup-python@v4.2.0
      with:
        python-version: 3.8
    -
      name: Install dependencies
      run: pip install -r test/requirements.txt
    -
      name: Test with tox
      run: tox -c test/tox.${DISTRO}.ini