-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set up PR validation #6
Closed
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4e49f0e
Create python-package.yml
molly-moen 525bebd
remove unittest install
molly-moen bb9d333
test module?
molly-moen 92af964
Another attempt
molly-moen e7ad761
build package
molly-moen 2927c37
install build
molly-moen 926d150
folder change
molly-moen 30feec9
add additional dependency
molly-moen 60a0e6a
use pipenv
molly-moen 269bc02
more pipenv
molly-moen 47a4681
testing
molly-moen 1d57c37
clean up
molly-moen e0ad013
install ruff
molly-moen dcdb528
Merge remote-tracking branch 'origin/molly/setup-automation' into mol…
molly-moen 11297a5
add linter
molly-moen 169fd27
fix linter errors
molly-moen 59a8c0c
Merge remote-tracking branch 'origin/molly/setup-automation' into mol…
molly-moen f63525d
move ruff to dev dependency and update readme
molly-moen ab1beaf
removed commented out lines
molly-moen 9e7e097
update readme
molly-moen 84850b2
Merge remote-tracking branch 'origin/molly/setup-automation' into mol…
molly-moen aa016f1
remove requests dependency
molly-moen 3d476ba
rename script
molly-moen 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 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,42 @@ | ||||||
# This workflow will install Python dependencies, run tests and lint. | ||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||||||
|
||||||
name: Lint and Test Packages | ||||||
|
||||||
on: | ||||||
push: | ||||||
branches: [ "main" ] | ||||||
pull_request: | ||||||
branches: [ "main" ] | ||||||
|
||||||
jobs: | ||||||
build: | ||||||
|
||||||
runs-on: ubuntu-latest | ||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
python-version: ["3.12.2"] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets go ahead and add 13 to the matrix!
Suggested change
|
||||||
|
||||||
steps: | ||||||
- uses: actions/checkout@v4 | ||||||
- name: Set up Python ${{ matrix.python-version }} | ||||||
uses: actions/setup-python@v3 | ||||||
with: | ||||||
python-version: ${{ matrix.python-version }} | ||||||
- name: Install dependencies | ||||||
run: | | ||||||
python -m pip install --upgrade pip | ||||||
python -m pip install pipenv | ||||||
python -m pip install ruff | ||||||
- name: Lint with ruff | ||||||
run: | | ||||||
ruff check | ||||||
- name: Test with unittest | ||||||
run: | | ||||||
cd packages/pythonlab_setup | ||||||
pipenv install | ||||||
cd pythonlab_setup | ||||||
pipenv run python -m unittest | ||||||
cd ../.. | ||||||
# Repeat install and run unit tests for any other packages with tests. |
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ requests = "*" | |
matplotlib = "*" | ||
|
||
[dev-packages] | ||
ruff = "*" | ||
|
||
[requires] | ||
python_version = "3.12" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .setup_pythonlab import setup_pythonlab | ||
from .teardown_pythonlab import teardown_pythonlab | ||
from .setup_pythonlab import setup_pythonlab as setup_pythonlab | ||
from .teardown_pythonlab import teardown_pythonlab as teardown_pythonlab |
This file contains 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,12 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
|
||
[dev-packages] | ||
ruff = "*" | ||
|
||
[requires] | ||
python_version = "3.12" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
from .run_tests import run_student_tests, run_validation_tests | ||
from .run_tests import run_student_tests as run_student_tests, run_validation_tests as run_validation_tests |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary. Nobody will be checking these post-merge actions. The primary goal here is to test PR's and get status feedback before merging.