您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pythonapp.yml 1.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839
  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 coverage run -m unittest test
  19. pipenv run codecov --token=${{ secrets.CODECOV_TOKEN }}
  20. - name: Lint
  21. run: |
  22. pipenv run pylint kosmorro *.py kosmorrolib/*.py
  23. - name: Check i18n
  24. run: |
  25. pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null
  26. n=$(diff -y --suppress-common-lines kosmorrolib/locales/messages.pot /tmp/kosmorro-messages.pot | grep -v -E '^"POT-Creation-Date: ' | wc -l)
  27. if [ "$n" -ne "0" ]; then
  28. echo "❌ The messages file is not up-to-date!"
  29. echo " Please run the following command to fix this:"
  30. echo
  31. echo " pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot"
  32. exit 1
  33. fi
  34. echo "✔ Messages file up-to-date."