-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add multiple python versions to CI tests #858
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c8536f1
Add multiple python versions to CI tests
shaunagm fb58f59
Remove duplicate key
shaunagm d2b4563
Combine CI jobs
shaunagm 32b5a1d
Update ubuntu image and actually install Python versions
shaunagm a5ddd82
Replace pyenv with apt-get to install python versions
shaunagm bbae815
Remove sudo
shaunagm 421b6a1
Remove get from 'apt-get'
shaunagm 7b00140
Update apt before attempting to install
shaunagm 8f0ab5e
Add ppa/deadsnakes repository
shaunagm e148501
Add prereq
shaunagm 83d15a6
Fix typo
shaunagm bcd9a87
Add -y to install command
shaunagm 5497f03
Move -y to correct spot
shaunagm eadcdc4
Add more -ys
shaunagm 4183899
Add some echoes to debug
shaunagm 15e02e6
Switch back to pyenv approach
shaunagm faf6587
Remove tests from circleci config and move to new github actions config
shaunagm 2dbf3b4
Split out Mac tests into seaparate file
shaunagm fd922b1
Set testing environmental variable separately
shaunagm 876e08b
First attempt to add depdendency cache
shaunagm d7959f4
Remove windows tests for now
shaunagm 7786c26
Fix circleci config
shaunagm ca9e69c
Fix circleci for real this time
shaunagm 2debaa1
Merge branch 'main' into update-ci
shaunagm af933e7
Add tests on merging of PRs and update readme to show we do not suppo…
shaunagm 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
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,51 @@ | ||
name: tests | ||
|
||
on: | ||
pull_request: | ||
branches: ["main"] | ||
push: | ||
branches: ["main"] | ||
|
||
env: | ||
TESTING: 1 | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10'] | ||
os: [ubuntu-latest] # add in windows-latest to add windows testing | ||
include: | ||
- os: ubuntu-latest | ||
path: ~/.cache/pip | ||
# - os: windows-latest | ||
# path: ~\AppData\Local\pip\Cache | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ matrix.path }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
|
||
- name: Install dependencies | ||
run: python -m pip install -r requirements.txt | ||
|
||
- name: Run tests | ||
run: pytest -rf test/ | ||
|
||
- name: check linting | ||
run: | | ||
# E203 and W503 don't work well with black | ||
flake8 parsons/ test/ useful_resources/ --extend-ignore=E203,W503 | ||
black --check parsons/ test/ useful_resources/ |
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,43 @@ | ||
name: tests for mac | ||
# test mac on single python version as mac tests use 10x minutes/storage | ||
|
||
on: | ||
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. Consider adding "on push" |
||
pull_request: | ||
branches: ["main"] | ||
push: | ||
branches: ["main"] | ||
|
||
env: | ||
TESTING: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: mac-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
mac-pip- | ||
|
||
- name: Install dependencies | ||
run: python -m pip install -r requirements.txt | ||
|
||
- name: Run tests | ||
run: TESTING=1 pytest -rf test/ | ||
|
||
- name: check linting | ||
run: | | ||
# E203 and W503 don't work well with black | ||
flake8 parsons/ test/ useful_resources/ --extend-ignore=E203,W503 | ||
black --check parsons/ test/ useful_resources/ |
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
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.
Consider adding "on push" so tests run once more when PRs are merged into main