-
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
Switch from travis-ci to GitHub workflow. #185
base: master
Are you sure you want to change the base?
Changes from all 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,73 @@ | ||||||||||
name: Main CI | ||||||||||
|
||||||||||
on: [push] | ||||||||||
|
||||||||||
jobs: | ||||||||||
lint: | ||||||||||
runs-on: ubuntu-latest | ||||||||||
timeout-minutes: 10 | ||||||||||
strategy: | ||||||||||
matrix: | ||||||||||
python-version: | ||||||||||
- '3.12' | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v4 | ||||||||||
- name: Use Python ${{ matrix.python-version }} | ||||||||||
uses: actions/setup-python@v4 | ||||||||||
with: | ||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||
cache: 'pip' | ||||||||||
- name: Install testing dependencies | ||||||||||
run: | | ||||||||||
python -m pip install --upgrade pip | ||||||||||
pip install -r requirements-test.txt | ||||||||||
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. I thought 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.
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. The intent of 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. I don't believe install_requires=[
'cachetools',
'frozendict',
'lxml',
],
extras_require={
'requests': ['requests'],
'aiohttp': ['aiohttp'],
'cachetools': ['cachetools'],
'frozendict': ['frozendict'],
} These are the dependencies. This opens the possibility to use As an ideal solution, I would use something like |
||||||||||
- name: Lint | ||||||||||
# FIXME | ||||||||||
continue-on-error: true | ||||||||||
run: | | ||||||||||
flake8 lib/pyld tests --count --show-source --statistics | ||||||||||
env: | ||||||||||
LOADER: ${{ matrix.loader }} | ||||||||||
test: | ||||||||||
runs-on: ubuntu-latest | ||||||||||
needs: [lint] | ||||||||||
timeout-minutes: 10 | ||||||||||
strategy: | ||||||||||
matrix: | ||||||||||
python-version: | ||||||||||
- '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. I 👏 applaud the decision to deprecate currently unsupported Python versions, which are < 3.8. |
||||||||||
- '3.9' | ||||||||||
- '3.10' | ||||||||||
- '3.11' | ||||||||||
- '3.12' | ||||||||||
- 'pypy3.10' | ||||||||||
loader: [requests, aiohttp] | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v4 | ||||||||||
- name: Use Python ${{ matrix.python-version }} | ||||||||||
uses: actions/setup-python@v4 | ||||||||||
with: | ||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||
cache: 'pip' | ||||||||||
- name: Install dependencies | ||||||||||
run: | | ||||||||||
python -m pip install --upgrade pip | ||||||||||
pip install -r requirements.txt | ||||||||||
- name: Install testing dependencies | ||||||||||
run: | | ||||||||||
pip install -r requirements-test.txt | ||||||||||
- name: Fetch test suites | ||||||||||
run: | | ||||||||||
git clone --depth 1 https://github.com/w3c/json-ld-api.git _json-ld-api | ||||||||||
git clone --depth 1 https://github.com/w3c/json-ld-framing.git _json-ld-framing | ||||||||||
git clone --depth 1 https://github.com/json-ld/normalization.git _normalization | ||||||||||
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. These three aren't going to be necessary if #182 is merged. 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. @davidlehn I would like to do this on top of #182 if possible. 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.
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.
Should we fix that? I thought I did add that as a dependency and we should be running against that there... |
||||||||||
- name: Test with Python=${{ matrix.python-version }} Loader=${{ matrix.loader }} | ||||||||||
run: | | ||||||||||
python tests/runtests.py ./_json-ld-api/tests -l ${{ matrix.loader }} | ||||||||||
python tests/runtests.py ./_json-ld-framing/tests -l ${{ matrix.loader }} | ||||||||||
python tests/runtests.py ./_normalization/tests -l ${{ matrix.loader }} | ||||||||||
Comment on lines
+66
to
+68
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
is going to be sufficient. 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. @anatoly-scherbakov the 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. @BigBlueHat it seems that |
||||||||||
env: | ||||||||||
LOADER: ${{ matrix.loader }} | ||||||||||
#coverage: | ||||||||||
# needs: [test] | ||||||||||
# FIXME |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flake8 |
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.
As per https://github.com/actions/checkout
Applies to the below again.
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.
Good to know we can do this, but I agree with @davidlehn that we should get this merged before #182 and can revisit this if/when #182 makes it in.