You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

43 rivejä
1.3 KiB

  1. name: Python application
  2. on: [push]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Set up Python
  9. uses: actions/setup-python@v1
  10. with:
  11. python-version: 3.8
  12. - name: Install dependencies
  13. run: |
  14. pip install --upgrade pip pipenv
  15. pipenv sync -d
  16. - name: Unit tests
  17. run: |
  18. pipenv run python -m unittest -v test
  19. - name: Code coverage
  20. run: |
  21. pipenv run python -m coverage run -m unittest test
  22. pipenv run codecov --token=${{ secrets.CODECOV_TOKEN }}
  23. - name: Lint
  24. run: |
  25. pipenv run pylint kosmorro *.py kosmorrolib/*.py
  26. - name: Check i18n
  27. run: |
  28. pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null
  29. n=$(diff -y --suppress-common-lines kosmorrolib/locales/messages.pot /tmp/kosmorro-messages.pot | grep -v -E '^"POT-Creation-Date: ' | wc -l)
  30. if [ "$n" -ne "0" ]; then
  31. echo "❌ The messages file is not up-to-date!"
  32. echo " Please run the following command to fix this:"
  33. echo
  34. echo " pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot"
  35. exit 1
  36. fi
  37. echo "✔ Messages file up-to-date."