-
Notifications
You must be signed in to change notification settings - Fork 28
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
More CI - run pytest in github action #95
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Run pytest | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
if: "!contains(github.event.head_commit.message, 'skip_ci')" | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
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. How does this line work? Does it test on each of these versions of python? 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. Yep, that basically creates 3 separate jobs, each with a different value of |
||
|
||
steps: | ||
- name: Checkout PreREISE | ||
uses: actions/checkout@v2 | ||
with: | ||
path: PreREISE | ||
- name: Checkout PowerSimData | ||
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. if it's possible to include a newline between each step, that would probably make it more readable |
||
uses: actions/checkout@v2 | ||
with: | ||
repository: intvenlab/PowerSimData | ||
token: ${{ secrets.CI_TOKEN_CLONE_REPO }} | ||
path: PowerSimData | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipenv | ||
pipenv install --python=${{ matrix.python-version }} | ||
working-directory: PreREISE | ||
- name: Test with pytest | ||
run: | | ||
pipenv run pytest . -m 'not integration' | ||
working-directory: PreREISE |
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.
👍