-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ci: switch to GitHub Actions #2210
Changes from 6 commits
4c3d33d
3cedd7e
f5d4b48
1f31e54
6d4b4ba
bf9918f
112cff0
80aa6c4
cc9942e
354c569
a1ef994
a79cac6
c41be65
ed2e0fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||
# TODO: Line 20, enable python-version: 3.5 | ||||||
# TODO: Line 69, enable pytest --doctest-modules | ||||||
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. This seems quite important to me. What are the remaining blockers? |
||||||
|
||||||
name: Tests | ||||||
cclauss marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
on: | ||||||
push: | ||||||
branches: | ||||||
- master | ||||||
pull_request: | ||||||
branches: | ||||||
- master | ||||||
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.
Suggested change
I usually run tests on all pull requests on all branches. Is there a reason to avoid doing that? |
||||||
|
||||||
jobs: | ||||||
test: | ||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
node: [10.x, 12.x, 14.x] | ||||||
python: [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. Please do just one test run 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. tested it in cc9942e and it passes (only the doctest-modules fails so I reverted it back to a TODO) |
||||||
os: [macos-latest, ubuntu-latest, windows-latest] | ||||||
runs-on: ${{ matrix.os }} | ||||||
steps: | ||||||
- name: Checkout Repository | ||||||
uses: actions/checkout@v2 | ||||||
- name: Use Node.js ${{ matrix.node }} | ||||||
uses: actions/setup-node@v1 | ||||||
with: | ||||||
node-version: ${{ matrix.node }} | ||||||
- name: Use Python ${{ matrix.python }} | ||||||
uses: actions/setup-python@v2 | ||||||
with: | ||||||
python-version: ${{ matrix.python }} | ||||||
env: | ||||||
PYTHON_VERSION: ${{ matrix.python }} | ||||||
- name: Install Dependencies | ||||||
run: | | ||||||
npm install --no-progress | ||||||
pip install flake8 pytest | ||||||
- name: Lint node | ||||||
if: matrix.os == 'ubuntu-latest' | ||||||
run: | | ||||||
npm run lint | ||||||
- name: Lint 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.
Suggested change
|
||||||
if: matrix.os == 'ubuntu-latest' | ||||||
run: | | ||||||
# stop the build if there are Python syntax errors or undefined names | ||||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||||||
- name: Run node tests (Linux and macOS) | ||||||
if: matrix.os != 'windows-latest' | ||||||
run: | | ||||||
npm test | ||||||
- name: Run python tests (Linux and macOS) | ||||||
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.
Suggested change
|
||||||
if: matrix.os != 'windows-latest' | ||||||
run: | | ||||||
python -m pytest | ||||||
- name: Run node tests (Windows) | ||||||
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.
Suggested change
|
||||||
if: matrix.os == 'windows-latest' | ||||||
shell: bash | ||||||
run: | | ||||||
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" npm test | ||||||
- name: Run python tests (Windows) | ||||||
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.
Suggested change
|
||||||
if: matrix.os == 'windows-latest' | ||||||
shell: bash | ||||||
run: | | ||||||
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest | ||||||
# - name: Run doctests with pytest | ||||||
# run: pytest --doctest-modules |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,6 @@ | |
}, | ||
"scripts": { | ||
"lint": "standard */*.js test/**/*.js", | ||
"test": "npm run lint && tap --timeout=120 test/test-*" | ||
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. So, I'd really like this to stay for 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. Added 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. and reverted? was it too complicated? 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. it broke windows tests because it added to variables to the environment. Rather go for a smaller changes than go changing things left and right. |
||
"test": "tap --timeout=120 test/test-*" | ||
} | ||
} |
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.
Given that Py35 reaches end-of-life in less than two weeks, let's just remove support.
https://devguide.python.org/#status-of-python-branches