diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b689dd37e..cbb906e31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: "Install packages" run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends graphviz gnupg2 gpgv2 git gcc make devscripts + sudo apt-get install -y --no-install-recommends graphviz gnupg2 gpgv2 git gcc make devscripts python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage python3-etcd3 python3-plyvel - name: "Checkout repository" uses: actions/checkout@v4 @@ -53,17 +53,6 @@ jobs: with: go-version: ${{ steps.goversion.outputs.GOVER }} - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: "Install Python packages" - run: | - pip install six packaging appdirs virtualenv - pip install -U pip setuptools - pip install -r system/requirements.txt - - name: "Install Azurite" id: azuright uses: potatoqualitee/azuright@v1.1 diff --git a/Makefile b/Makefile index 71a7731a1..f1af6f14e 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ RELEASE=no help: ## Print this help @grep -E '^[a-zA-Z][a-zA-Z0-9_-]*:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -all: prepare test bench check system-test # used for system tests in ci +all: prepare test bench flake8 system-test # used for system tests in ci prepare: ## Install go module dependencies # set version @@ -31,24 +31,15 @@ prepare: ## Install go module dependencies go mod tidy -v go generate -check: system/env -ifeq ($(RUN_LONG_TESTS), yes) +flake8: system/env/bin/flake8 -endif install: @echo "\e[33m\e[1mBuilding aptly ...\e[0m" go generate @out=`mktemp`; if ! go install -v > $$out 2>&1; then cat $$out; rm -f $$out; echo "\nBuild failed\n"; exit 1; else rm -f $$out; fi -system/env: system/requirements.txt -ifeq ($(RUN_LONG_TESTS), yes) - rm -rf system/env - $(PYTHON) -m venv system/env - system/env/bin/pip install -r system/requirements.txt -endif - -system-test: install system/env ## Run system tests in github CI +system-test: install ## Run system tests in github CI ifeq ($(RUN_LONG_TESTS), yes) go generate # install etcd @@ -223,4 +214,4 @@ clean: ## remove local build and module cache rm -rf build/ docs/ obj-*-linux-gnu* rm -f unit.out aptly.test -.PHONY: help man prepare version binaries docker-release docker-system-tests docker-unit-tests docker-lint docker-build docker-image build docker-shell clean releasetype dpkg dev-server docker-dev-server +.PHONY: help man prepare version binaries docker-release docker-system-tests docker-unit-tests docker-lint docker-build docker-image build docker-shell clean releasetype dpkg dev-server docker-dev-server flake8