diff --git a/.github/workflows/pr_approval.yaml b/.github/workflows/pr_approval.yaml new file mode 100644 index 00000000..30e19dcc --- /dev/null +++ b/.github/workflows/pr_approval.yaml @@ -0,0 +1,38 @@ +name: Pytest + +on: + - push + - pull_request + +jobs: + pytest: + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - run: pip install --upgrade setuptools + - run: pip install --upgrade wheel + - run: pip install pycodestyle + - run: pip install pydocstyle + - run: pip install pytest-cov + - run: pip install --upgrade importlib-metadata + - run: pip install behave + - run: pip install semver + - name: Style checks + run: make style + - name: Docstrings checks + run: make doc-check + - name: Unit tests + run: make unit_tests + - name: Unit tests coverage + run: make coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 79854024..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -dist: jammy -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10-dev" - - "3.11-dev" - # - "nightly" # nightly build -addons: - apt: - packages: - - libsnappy-dev -# Pycodestyle part -# needed to work correctly with Python 3 shebang -env: SKIP_INTERPRETER=true -install: - - pip install pycodestyle - - pip install pydocstyle - - pip install pytest-cov - - pip install behave - - pip install semver -script: - - make style - - make doc-check - - rm tmp.md - - make unit_tests - - make coverage diff --git a/Makefile b/Makefile index 54377dbf..82c1ea17 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ smart-proxy-tests: ## Run BDD tests for the Insights Results Smart Proxy service smart-proxy-code-coverage: ## Compute code coverage for Smart Proxy service ./smart_proxy_tests.sh coverage -style: code-style docs-style shellcheck ## Perform all style checks +style: code-style docs-style ## Perform all style checks code-style: ## Check code style for all Python sources from this repository python3 tools/run_pycodestyle.py