Skip to content

Commit

Permalink
Update CI pipeline to not do python validation
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca>
  • Loading branch information
rydrman committed Apr 9, 2022
1 parent 7727c35 commit fbc8fba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
6 changes: 1 addition & 5 deletions .github/scripts/unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 6 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit fbc8fba

Please sign in to comment.