github actions: ensure our apt cache is up2date
[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: Update APT cache
19       run: sudo apt-get update
20
21     - name: Install lintian
22       run: sudo apt-get -y install lintian
23
24     - name: Spellcheck execution
25       run: make spellcheck
26
27   codecheck:
28     runs-on: ubuntu-latest
29     name: Run codecheck
30
31     steps:
32     - name: Checkout source
33       uses: actions/checkout@v2
34
35     - name: Display original shellcheck version
36       run: shellcheck --version
37
38     - name: Update shellcheck to latest stable version
39       run: |
40         wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz | tar -xJv
41         sudo cp shellcheck-stable/shellcheck /usr/bin/
42
43     - name: pip install flake8, isort + black
44       run: pip3 install -U flake8 isort black
45
46     - name: Display current shellcheck version
47       run: shellcheck --version
48
49     - name: Display current flake8 version
50       run: flake8 --version
51
52     - name: Display current isort version
53       run: isort --version
54
55     - name: Display current black version
56       run: black --version
57
58     - name: Codecheck execution
59       run: make --keep-going codecheck