9137f2f53d7f58cebb0693aa7c8421640de3d014
[grml-scripts.git] / .github / workflows / tests.yml
1 name: Code Testing
2
3 on:
4   push:
5   pull_request:
6   schedule:
7     - cron: '42 1 * * *'
8
9 jobs:
10   spellcheck:
11     runs-on: ubuntu-latest
12     name: Run spellcheck
13
14     steps:
15     - name: Checkout source
16       uses: actions/checkout@v2
17
18     - name: Install lintian
19       run: sudo apt-get -y install lintian
20
21     - name: Spellcheck execution
22       run: make spellcheck
23
24   codecheck:
25     runs-on: ubuntu-latest
26     name: Run codecheck
27
28     steps:
29     - name: Checkout source
30       uses: actions/checkout@v2
31
32     - name: Display original shellcheck version
33       run: shellcheck --version
34
35     - name: Update shellcheck to latest stable version
36       run: |
37         wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz | tar -xJv
38         sudo cp shellcheck-stable/shellcheck /usr/bin/
39
40     - name: pip install flake8, isort + black
41       run: pip3 install -U flake8 isort black
42
43     - name: Display current shellcheck version
44       run: shellcheck --version
45
46     - name: Display current flake8 version
47       run: flake8 --version
48
49     - name: Display current isort version
50       run: isort --version
51
52     - name: Display current black version
53       run: black --version
54
55     - name: Codecheck execution
56       run: make codecheck