Skip to content

Commit

Permalink
CI: Add new checks for spell, signed-off and build eggs
Browse files Browse the repository at this point in the history
Add job to build package (egg)

Check signed-off-by to make sure new commits are signed by the author.

Add spellchecker together with its requirements on pyenchant to
requirements-travis.txt

Sphinx is already listed in requirements-travis.txt, remove it.

Signed-off-by: Ana Guerrero Lopez <[email protected]>
  • Loading branch information
ana committed Aug 23, 2021
1 parent 0ba409e commit ac52469
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install Sphinx==1.3b1
pip install -r requirements-travis.txt
run: pip install -r requirements-travis.txt
- name: Check out Avocado libs
uses: actions/checkout@v2
with:
Expand All @@ -56,4 +54,33 @@ jobs:
run: AVOCADO_LOG_DEBUG=yes avocado vt-bootstrap --vt-skip-verify-download-assets --yes-to-all
- name: Run tests
run: inspekt checkall --disable-lint W,R,C,E1002,E1101,E1103,E1120,F0401,I0011,E1003,W605 --disable-style W605,W606,E501,E265,W601,E402,E722,E741 --exclude avocado-libs,scripts/github --no-license-check
- name: Run spellchecker
run: pylint --errors-only --disable=all --ignore=avocado-libs --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=spell.ignore *
- name: Check signed-off-by
run: ./selftests/signedoff-check.sh
- run: echo "This job's status is ${{ job.status }}."

package-build:
name: Build Package for Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Build eggs
run: python setup.py bdist_egg
- run: echo "🥑 This job's status is ${{ job.status }}."
1 change: 1 addition & 0 deletions requirements-travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ aexpect==1.6.0
simplejson==3.8.0
netaddr==0.7.19
netifaces>=0.10.5
pyenchant
10 changes: 10 additions & 0 deletions selftests/signedoff-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh -e

echo "** Running signedoff-check..."

AUTHOR="$(git log --no-merges -1 --pretty='format:%aN <%aE>')"
git log --no-merges -1 --pretty=format:%B | grep -i "Signed-off-by: $AUTHOR"
if [ $? != 0 ]; then
echo "The commit message does not contain author's signature (Signed-off-by: $AUTHOR)"
exit 1
fi

0 comments on commit ac52469

Please sign in to comment.