Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Tox unit tests

on:
# We use pull_request_target so that dependabot-created workflows can run
pull_request_target:
types:
- opened
- synchronize
- ready_for_review
- reopened
branches:
- main

# Use the head ref for workflow concurrency, with cancellation
# This should mean that any previous workflows for a PR get cancelled when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
name: Tox unit tests and linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']

steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox

- name: Test with tox
run: tox

- name: Generate coverage reports
run: tox -e cover

- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: cover/
3 changes: 3 additions & 0 deletions .stestr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[DEFAULT]
test_path=./pyhelm3/tests
top_dir=./
8 changes: 4 additions & 4 deletions pyhelm3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .client import *
from .command import *
from .errors import *
from .models import *
from .client import * # noqa: F403
from .command import * # noqa: F403
from .errors import * # noqa: F403
from .models import * # noqa: F403
Loading