From fbc8fbac66d8de68ae062494ff723f88d547b347 Mon Sep 17 00:00:00 2001 From: Ryan Bottriell Date: Sat, 9 Apr 2022 10:21:18 -0700 Subject: [PATCH] Update CI pipeline to not do python validation Signed-off-by: Ryan Bottriell --- .github/scripts/unittests.sh | 6 +----- .github/workflows/test.yml | 8 -------- Makefile | 28 ++++++---------------------- 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/.github/scripts/unittests.sh b/.github/scripts/unittests.sh index b2ca8bd509..9ebbbc587a 100644 --- a/.github/scripts/unittests.sh +++ b/.github/scripts/unittests.sh @@ -6,7 +6,7 @@ export LANG=en_US.utf8 cd /source -yum install make rpm-build python36 tcsh deps/*.rpm -y > /dev/null 2>&1 +yum install make rpm-build tcsh deps/*.rpm -y > /dev/null 2>&1 (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh /dev/stdin -y) > /dev/null 2>&1 source /root/.cargo/env @@ -15,9 +15,5 @@ sed -i 's|$HOME|/root|' /root/.bashrc yum-builddep -y spk.spec > /dev/null 2>&1 -pip3 install pipenv > /dev/null 2>&1 -pipenv sync --dev > /dev/null 2>&1 - sed -i "s|github.com|$SPFS_PULL_USERNAME:$SPFS_PULL_PASSWORD@github.com|" /source/Cargo.toml -make devel > /dev/null 2>&1 make test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f59a1ec416..f585341db9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,6 @@ env: CARGO_TERM_COLOR: always jobs: - lint-python: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - run: sudo pip3 install pipenv - - run: pipenv sync --dev - - name: Lint Python Code - run: make lint-python lint-rust: runs-on: ubuntu-latest env: diff --git a/Makefile b/Makefile index 80dd3f5c1c..6766bb2bc9 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = $(shell grep Version spk.spec | cut -d ' ' -f 2) # Create a file called "config.mak" to configure variables. -include config.mak -default: devel +default: lint test .PHONY: packages packages: @@ -18,37 +18,21 @@ packages.%: .PHONY: clean clean: packages.clean -.PHONY: lint lint-python lint-rust -lint: lint-rust lint-python +.PHONY: lint lint-rust +lint: lint-rust lint-rust: # we need to ingore this clippy warning until the next # release of py03 which solves for it cargo clippy -- -Dwarnings -Aclippy::needless_option_as_deref -lint-python: - pipenv run -- mypy spk spkrs - pipenv run -- black --check spk setup.py spkrs packages/spk-convert-pip/spk-convert-pip .PHONY: format format: - pipenv run -- black spk setup.py spkrs packages/spk-convert-pip/spk-convert-pip + cargo fmt -.PHONY: devel -devel: - pipenv run -- python setup.py develop - -.PHONY: test test-python test-rust -test: test-rust test-python +.PHONY: test test-rust +test: test-rust test-rust: spfs run - -- cargo test --no-default-features -test-python: - mkdir -p /tmp/spfs-runtimes - SPFS_STORAGE_RUNTIMES="/tmp/spfs-runtimes" \ - pipenv run -- spfs run - -- pytest -x -vvv - -.PHONY: cargo-test -cargo-test: - # some tests must be run in an spfs environment - spfs run - -- cargo test --no-default-features converters: $(MAKE) -C packages spk-convert-pip/spk-convert-pip.spk