[go: nahoru, domu]

Skip to content

Commit

Permalink
Publish to PyPI using Github Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Dec 19, 2020
1 parent 1485bc2 commit 7d97b43
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python package
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
Expand Down Expand Up @@ -34,3 +34,32 @@ jobs:
CC=clang-8 make test-c-src
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop

release:
needs: [test]
runs-on: ubuntu-20.04

steps:
- name: Checkout
if: startsWith(github.ref, 'refs/tags')
uses: actions/checkout@v1
- name: Set up Python 3.9
if: startsWith(github.ref, 'refs/tags')
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
if: startsWith(github.ref, 'refs/tags')
run: |
python -m pip install build --user
- name: Build a binary wheel and a source tarball
if: startsWith(github.ref, 'refs/tags')
run: |
git clean -dfx
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
password: ${{ secrets.pypi_password }}
2 changes: 1 addition & 1 deletion cantools/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '35.5.0'
__version__ = '36.0.0'
2 changes: 1 addition & 1 deletion tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -4566,7 +4566,7 @@ def test_system_arxml_traversal(self):
bar = loader._follow_arxml_reference(loader._root, "/CanFrame/Message1", "CAN-FRAME")
self.assertEqual(foo, bar)

# test non-unique location while assuming that it is unque
# test non-unique location while assuming that it is unique
with self.assertRaises(ValueError) as cm:
no_base_elem = loader._get_unique_arxml_child(loader._root, ["AR-PACKAGES", "*AR-PACKAGE"])
self.assertEqual(str(cm.exception), "['AR-PACKAGES', '*AR-PACKAGE'] does not resolve into a unique node")
Expand Down

0 comments on commit 7d97b43

Please sign in to comment.