-
Notifications
You must be signed in to change notification settings - Fork 0
Test Pipeline #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c66460f
test: add generic import test
ba151ee
chore: update pyproject to include dev dependencies
4698d44
chore: update workflow to run on PR
eecd811
bug: fix cache to use v4
9a1b123
bug: upload .coveragerc file
ffd9429
Merge branch 'main' into 4/test-pipeline
0d3c834
bug: add pytest-cov to dev dependencies
3e40f36
chore: update to require a coverage minimum of 100
e1dbe3c
chore: update to fail under 100%
84f460f
bug: test coverage reports (ROLLBACK LATER)
280eb26
fix: workflow erroring on tests stage
522a20d
Revert "bug: test coverage reports (ROLLBACK LATER)"
b61f365
Update .github/workflows/test-project.yml
ChristopherLi05 77227b1
fix: add coverage to dev dependencies
58d9e8b
Merge remote-tracking branch 'origin/4/test-pipeline' into 4/test-pip…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [run] | ||
| omit = | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: Scadable Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| test: | ||
| if: github.event.pull_request.draft == false | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Cache pip | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| ${{ runner.os }}- | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip setuptools | ||
| pip install -e .[dev] | ||
| - name: Run tests | ||
| run: | | ||
| pytest --cov src/scadable --cov-config=.coveragerc --cov-report lcov | ||
| # - name: Upload test coverage to coveralls.io | ||
| # uses: coverallsapp/github-action@v2 | ||
| # with: | ||
| # flag-name: run-${{ matrix.os }}-${{ matrix.python-version }} | ||
| # parallel: true | ||
| - name: Ensure Code Coverage | ||
| run: coverage report --fail-under=100 | ||
ChristopherLi05 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # finish: | ||
| # needs: test | ||
| # if: github.event.pull_request.draft == false | ||
| # runs-on: ubuntu-latest | ||
| # steps: | ||
| # - name: Coveralls Finished | ||
| # uses: coverallsapp/github-action@v2 | ||
| # with: | ||
| # parallel-finished: true | ||
| # carryforward: "run-ubuntu-latest-3.9,run-ubuntu-latest-3.10,run-ubuntu-latest-3.11,run-ubuntu-latest-3.12,run-ubuntu-latest-3.13,run-macos-latest-3.9,run-macos-latest-3.10,run-macos-latest-3.11,run-macos-latest-3.12,run-macos-latest-3.13,run-windows-latest-3.9,run-windows-latest-3.10,run-windows-latest-3.11,run-windows-latest-3.12,run-windows-latest-3.13" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| def test_module_import(): | ||
| import src.scadable |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.