-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (65 loc) · 2.07 KB
/
test.yml
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
64
65
66
67
68
69
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test Python package
on:
push:
# branches: [ $default-branch ]
branches-ignore:
- 'main'
- 'develop'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
- name: Lint with flake8
run: |
# remove old reports folder and create new one
rm -rf reports
mkdir -p reports/sca
mkdir -p reports/test_results
mkdir -p reports/coverage
flake8 . --output-file=reports/sca/flake8.out --exit-zero
# - name: Test with pytest
# run: |
# python -m pip install pytest
# pytest
# - name: Test with nose2
# run: |
# python -m pip install nose2
# nose2 --config tests/unittest.cfg
# coverage xml
# coverage html
# - name: Upload pytest test results
# uses: actions/upload-artifact@v3
# with:
# name: pytest-results-${{ matrix.python-version }}
# path: junit/test-results-${{ matrix.python-version }}.xml
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}
- name: Install deploy dependencies
run: |
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file nextion/version.py \
--version_file_type py \
--debug
python setup.py sdist
rm dist/*.orig
- name: Test build package
run: |
twine check dist/*