name: Python application on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Python uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install dependencies run: | pip install --upgrade pip pipenv pipenv sync -d - name: Unit tests run: | pipenv run python -m coverage run -m unittest test pipenv run codecov --token=${{ secrets.CODECOV_TOKEN }} - name: Lint run: | pipenv run pylint kosmorro *.py kosmorrolib/*.py - name: Check i18n run: | pipenv run python setup.py extract_messages --output-file=/tmp/kosmorro-messages.pot > /dev/null n=$(diff -y --suppress-common-lines kosmorrolib/locales/messages.pot /tmp/kosmorro-messages.pot | grep -v -E '^"POT-Creation-Date: ' | wc -l) if [ "$n" -ne "0" ]; then echo "❌ The messages file is not up-to-date!" echo " Please run the following command to fix this:" echo echo " pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot" exit 1 fi echo "✔ Messages file up-to-date."