Skip to content

Commit

Permalink
Update push-checks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed May 29, 2024
1 parent 01da920 commit e6d4716
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/push-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,49 +30,49 @@ jobs:
with:
cache: 'pip' # caching pip dependencies
python-version-file: '.python-version'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel flake8 pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Setup flake8 annotations
uses: rbialon/flake8-annotations@v1
- name: Lint with flake8
env:
ROOT_SHA: ${{github.base_ref}}
run: |
DATA=$(jq --raw-output .before $GITHUB_EVENT_PATH)
echo "DATA: ${DATA}"
#######################################################################
# stop the build if there are Python syntax errors or undefined names, ignore existing
#######################################################################
# We need to get just the *filenames* of only *python* files changed.
# Using various -z/-Z/-0 to utilise NUL-terminated strings.
git diff --name-only --diff-filter=d -z "$DATA" | \
grep -E -z -Z '\.py$' | \
xargs -0 flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
#######################################################################
#######################################################################
# 'Full' run, but ignoring docstring errors
#######################################################################
# explicitly ignore docstring errors (start with D)
# Can optionally add `--exit-zero` to the flake8 arguments so that
git diff --name-only --diff-filter=d -z "$DATA" | \
grep -E -z -Z '\.py$' | \
xargs -0 flake8 --count --statistics --extend-ignore D
#######################################################################
- name: mypy type checks
run: |
./scripts/mypy-all.sh --platform win32
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install wheel flake8 pytest
# if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
#
# - name: Setup flake8 annotations
# uses: rbialon/flake8-annotations@v1
#
# - name: Lint with flake8
# env:
# ROOT_SHA: ${{github.base_ref}}
# run: |
# DATA=$(jq --raw-output .before $GITHUB_EVENT_PATH)
#
# echo "DATA: ${DATA}"
# #######################################################################
# # stop the build if there are Python syntax errors or undefined names, ignore existing
# #######################################################################
# # We need to get just the *filenames* of only *python* files changed.
# # Using various -z/-Z/-0 to utilise NUL-terminated strings.
# git diff --name-only --diff-filter=d -z "$DATA" | \
# grep -E -z -Z '\.py$' | \
# xargs -0 flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# #######################################################################
#
# #######################################################################
# # 'Full' run, but ignoring docstring errors
# #######################################################################
# # explicitly ignore docstring errors (start with D)
# # Can optionally add `--exit-zero` to the flake8 arguments so that
# git diff --name-only --diff-filter=d -z "$DATA" | \
# grep -E -z -Z '\.py$' | \
# xargs -0 flake8 --count --statistics --extend-ignore D
# #######################################################################
#
# - name: mypy type checks
# run: |
# ./scripts/mypy-all.sh --platform win32

- name: translation checks
run: |
output=(python ./scripts/find_localised_strings.py --compare-lang L10n/en.template --directory . --ignore coriolis-data)
output=$(python ./scripts/find_localised_strings.py --compare-lang L10n/en.template --directory . --ignore coriolis-data)
echo "$output"
echo ${#output}
if [ -n "$output" ]; then
Expand Down

0 comments on commit e6d4716

Please sign in to comment.