mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	gitlab-ci: port lint_* job to Debian/bookworm for stability
This saves us from being surprised by new rules in pylint, pyflakes, etc like: https://gitlab.com/FestplattenSchnitzel/fdroidserver/-/jobs/3895256515
This commit is contained in:
		
							parent
							
								
									ae2b33dab3
								
							
						
					
					
						commit
						4282d34343
					
				
					 2 changed files with 20 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -182,13 +182,29 @@ gradlew-fdroid:
 | 
			
		|||
 | 
			
		||||
# Run all the various linters and static analysis tools.
 | 
			
		||||
lint_format_safety_bandit_checks:
 | 
			
		||||
  image: alpine:3.16
 | 
			
		||||
  image: debian:bookworm-slim
 | 
			
		||||
  variables:
 | 
			
		||||
    LANG: C.UTF-8
 | 
			
		||||
  script:
 | 
			
		||||
    - apk add --no-cache bash build-base dash ca-certificates gcc git python3 python3-dev
 | 
			
		||||
    - python3 -m ensurepip
 | 
			
		||||
    - $pip install Babel bandit pycodestyle pyflakes pylint safety
 | 
			
		||||
    - apt-get update
 | 
			
		||||
    - apt-get -y install --no-install-recommends
 | 
			
		||||
          bash
 | 
			
		||||
          ca-certificates
 | 
			
		||||
          dash
 | 
			
		||||
          gcc
 | 
			
		||||
          gettext
 | 
			
		||||
          git
 | 
			
		||||
          make
 | 
			
		||||
          pycodestyle
 | 
			
		||||
          pyflakes3
 | 
			
		||||
          pylint
 | 
			
		||||
          python3-babel
 | 
			
		||||
          python3-dev
 | 
			
		||||
          python3-git
 | 
			
		||||
          python3-nose
 | 
			
		||||
          python3-pip
 | 
			
		||||
          python3-yaml
 | 
			
		||||
    - $pip install --break-system-packages bandit safety
 | 
			
		||||
    - export EXITVALUE=0
 | 
			
		||||
    - function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
 | 
			
		||||
    - ./hooks/pre-commit || set_error
 | 
			
		||||
| 
						 | 
				
			
			@ -206,7 +222,6 @@ lint_format_safety_bandit_checks:
 | 
			
		|||
            tests/*.py
 | 
			
		||||
            tests/*.TestCase
 | 
			
		||||
        || set_error
 | 
			
		||||
    - apk add --no-cache gettext make
 | 
			
		||||
    - make -C locale compile || set_error
 | 
			
		||||
    - rm -f locale/*/*/*.mo
 | 
			
		||||
    - pybabel compile --domain=fdroidserver --directory locale 2>&1 | (grep -F "error:" && exit 1) || true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue