Skip to content
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

[CR][ENG-5681] Great Big Python Upgrade #10648

Merged
merged 348 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
348 commits
Select commit Hold shift + click to select a range
473cd97
fixed flake8 warnings
opaduchak Mar 18, 2024
3dc4b04
Merge branch 'feature/dep-group-dev' into feature/python-upgrade
felliott Mar 20, 2024
1c47f33
bump version of gevent
ly-mariia Mar 14, 2024
72b1aae
update dep versions for transitions, pillow, geoip2
ly-mariia Mar 19, 2024
a4afa04
specify str encoding in nameparser
ly-mariia Mar 19, 2024
5b4539c
remove unused Pystache module
ly-mariia Mar 19, 2024
faa1f23
replace maxminddb-geolite2 to more modern geoip2;
ly-mariia Mar 19, 2024
e7f1084
remove python-magic
ly-mariia Mar 19, 2024
64a8561
downgrade geoip2 to avoid setuptools build failure
felliott Mar 25, 2024
78379ea
Merge branch 'feature/dep-group-catchall' into feature/python-upgrade
felliott Mar 25, 2024
e46aa12
removed _app_ctx_stack and _request_ctx_stack
opaduchak Mar 22, 2024
5b28d61
fied uritemplate.py -> uritemplate
opaduchak Mar 25, 2024
39d7dc2
fixed future version of ipdb
opaduchak Mar 25, 2024
57f62fc
Merge branch 'feature/fix-flask-context' into feature/python-upgrade
felliott Mar 25, 2024
61e16db
remove egap assets missed from prior purge
felliott Mar 26, 2024
2f97bea
repoint dv-client-pin pin to COS repo
felliott Mar 26, 2024
33aecfd
repoint mendeley-python-sdk pin to COS repo
felliott Mar 26, 2024
d8ed3a9
repoint djelme pin to COS repo
felliott Mar 26, 2024
054ba6b
replace mdx_del_ins fork with markdown-del-ins from pypi
felliott Mar 26, 2024
5391352
Merge branch 'feature/misc-updates' into feature/python-upgrade
felliott Mar 26, 2024
0e9eb50
updated furl usage
opaduchak Mar 12, 2024
c7864aa
added comments in locations that may be affected by furl upgrade
opaduchak Mar 13, 2024
8a4ac00
added reasoning behind urrlib3 version
opaduchak Mar 15, 2024
e656848
replace furl / op with .add(path=); minor typo fix
felliott Mar 28, 2024
74e03e1
Merge branch 'feature/dep-group-url-encoding' into feature/python-upg…
felliott Mar 28, 2024
db6e960
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott Mar 31, 2024
0946d6f
removed future usages
opaduchak Mar 20, 2024
7a3bdb0
removed future from mendeley
opaduchak Mar 21, 2024
c3a437e
Merge branch 'feature/dep-group-purge' into feature/python-upgrade
felliott Mar 31, 2024
1a9535f
update pymongo
ly-mariia Mar 25, 2024
732665e
update google & newrelic module versions
felliott Apr 2, 2024
640520c
update elasticsearch deps
felliott Apr 2, 2024
44e14bf
replace the raven module with sentry-sdk
felliott Apr 2, 2024
ca70c85
Merge branch 'feature/dep-group-services' into feature/python-upgrade
felliott Apr 2, 2024
fda8e09
fixed code to work with newer celery
opaduchak Mar 19, 2024
432c427
Merge branch 'feature/dep-group-celery' into feature/python-upgrade
felliott Apr 3, 2024
992c10a
bumped test dependencies
opaduchak Feb 27, 2024
c4b1934
fixed time.clock in tests and assert
opaduchak Feb 28, 2024
8bbb37c
fixed some asserts
opaduchak Feb 28, 2024
88867b7
fixed several tests, in cases where apis were changed or asserts not …
opaduchak Mar 26, 2024
ae8ef3b
fixed missing USE_COLOR
opaduchak Mar 26, 2024
8ae666b
Merge branch 'feature/dep-group-tests' into feature/python-upgrade
felliott Apr 11, 2024
18e9d81
update Postgres to version 15
ly-mariia Apr 3, 2024
8694e95
fix the error "cannot import name 'sentry' from 'framework.sentry'"
ly-mariia Apr 5, 2024
ab89e8b
add back pymongo dep to requirements.txt
felliott Apr 16, 2024
aab46ec
Merge branch 'feature/local-pg15' into feature/python-upgrade
felliott Apr 16, 2024
1e63cda
fixed more tests, added test report to CI, to ramp up development, fi…
opaduchak Mar 27, 2024
8794e52
fixed report generation on failure
opaduchak Mar 27, 2024
14bb7e3
added permission for test reporter to alter actions
opaduchak Mar 27, 2024
22cea9f
fixed pre-commit issues
opaduchak Mar 27, 2024
a48ee86
fixed faker issue, improved reports naming in CI
opaduchak Mar 27, 2024
5744328
fixed tests with otp
opaduchak Mar 27, 2024
df45eef
fixed part of quote tests failures, middleware process request
opaduchak Mar 28, 2024
655bcd8
fixed materialized bug, increased annotations limit and removed passi…
opaduchak Mar 28, 2024
3afa405
fixed materialized extecption, fixed es6 connection setup
opaduchak Mar 29, 2024
ec9e95b
silenced MaxmindDb file not foiund exception
opaduchak Mar 29, 2024
db090d6
allowed localhost for pytest-socket
opaduchak Apr 1, 2024
2f5329f
fixed flask_client in addons except osd storage
opaduchak Apr 1, 2024
b8f0ee4
removed all instances of *method*_json
opaduchak Apr 2, 2024
8b7b439
fixed allow_redirects and params for flask client and new pytest syntax
opaduchak Apr 2, 2024
b4ac23b
rest of errors which were left
opaduchak Apr 2, 2024
51b3629
fixed more tests for website
opaduchak Apr 2, 2024
9b51477
fixed more tests
opaduchak Apr 2, 2024
e3d8ed7
fixed more website tests
opaduchak Apr 3, 2024
7ef5e91
fixed event more tests
opaduchak Apr 3, 2024
afae991
fixed even more tests
opaduchak Apr 3, 2024
2518495
fixed even more website tests
opaduchak Apr 4, 2024
3ae121d
fixed more website errors related to FlaskClient
opaduchak Apr 4, 2024
74fe0af
fixed rest of FlaskClient related errors except for forms
opaduchak Apr 4, 2024
6842eaf
fixed sentry tests
opaduchak Apr 5, 2024
36ef494
more error fixes, lowered transitions to 0.8.11 due to breaking api c…
opaduchak Apr 8, 2024
3d6cb1f
fixed forms handling in tests
opaduchak Apr 8, 2024
778fb8b
applied more of easier test fixes
opaduchak Apr 9, 2024
23e7e72
fixed mocks and in some cases misuses of FlaskClient
opaduchak Apr 9, 2024
f66b73a
fixed rest of invalid calls of sentry.log_exception()
opaduchak Apr 9, 2024
f936a2f
fixed more tests in addons
opaduchak Apr 10, 2024
e3c7225
fixed send_hook in addons, attempt to fix twofactor
opaduchak Apr 10, 2024
f9ba569
fixed sendgrid tests
opaduchak Apr 11, 2024
e3443f1
fixed redirect issues
opaduchak Apr 11, 2024
fd06b14
fixed url encodeing test failures, added TODO comments to each case s…
opaduchak Apr 12, 2024
cc051c9
fixed more urlencoding test failures
opaduchak Apr 12, 2024
1b2b084
downgraded jsonschema validator to draft7
opaduchak Apr 15, 2024
ec51327
downgraded all jsonschema validators to draft7, for consistency reasons
opaduchak Apr 15, 2024
41e685c
fixed makring Embargo as completed
opaduchak Apr 16, 2024
7db5e0f
- fix github mock data;
ly-mariia Apr 11, 2024
f1bf8d3
- made the code more readable;
ly-mariia Apr 12, 2024
1b652d5
- fix error in test_folder_list_GET_expected_behavior test;
ly-mariia Apr 12, 2024
30a3623
- fixed error with URL decoding;
ly-mariia Apr 15, 2024
736ad49
- add the to_header function to the Auth class;
ly-mariia Apr 15, 2024
d9b757b
Merge branch 'feature/bugfix-party' into feature/python-upgrade
felliott Apr 17, 2024
ca52f69
fixed cors middleware errors
opaduchak Apr 17, 2024
f24a005
fixed report generation
opaduchak Apr 17, 2024
18343d3
Merge branch 'feature/fix-middleware' into feature/python-upgrade
felliott Apr 17, 2024
bdafdfb
fixed sendgrid tests
opaduchak Apr 11, 2024
f164d61
Merge branch 'feature/fix-sendgrid' into feature/python-upgrade
felliott Apr 18, 2024
b693dbb
fixed double quotes and datetime.UTC which is available only on pytho…
opaduchak Apr 18, 2024
93a149d
fixed metaclass issue in MockOAuth2Provider
opaduchak Apr 18, 2024
9821161
fixed double strings and flaske8 errors
opaduchak Apr 18, 2024
ce8b753
fixed leftover datetime.UTC
opaduchak Apr 18, 2024
ec26ee8
Merge branch 'feature/rebase-repairs' into feature/python-upgrade
felliott Apr 18, 2024
3188c86
hyphenize invoke task for worker command
felliott Apr 18, 2024
1fad18a
Merge branch 'feature/fix-worker' into feature/python-upgrade
felliott Apr 18, 2024
9b813c9
- fix error with passwords;
ly-mariia Apr 18, 2024
b4cdc4d
- remove unnecessary imports;
ly-mariia Apr 18, 2024
b62cc32
- fix status_code error for test_external_login_confirm_email_get_wit…
ly-mariia Apr 19, 2024
1bce789
- fix error for test_provider_down test;
ly-mariia Apr 19, 2024
b0cf268
Merge branch 'feature/fix-auth' into feature/python-upgrade
felliott Apr 22, 2024
87c4673
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott May 1, 2024
65e106f
resolved celery issue by skipping tests
opaduchak Apr 29, 2024
e4336ae
Merge branch 'feature/skip-share-interactions' into feature/python-up…
felliott May 1, 2024
e825378
explicitly close request context manager in test_session
opaduchak Apr 30, 2024
ed3b54e
Merge branch 'feature/teardown-testsession' into feature/python-upgrade
felliott May 3, 2024
76c2275
fixed testSearchViews queries for FlaskClient
opaduchak May 2, 2024
5bc8592
Merge branch 'feature/fix-testsearchviews' into feature/python-upgrade
felliott May 3, 2024
f63dc15
revert `datetime.UTC` back to pre-3.11 form
felliott May 5, 2024
e92c72e
declare test markers in pytest.ini to silence warnings
felliott May 5, 2024
d9d663f
fix incorrectly-named pytest marker
felliott May 5, 2024
e30c433
replace yield_fixture with fixture to silence warnings
felliott May 5, 2024
17a3aba
remove marker that is actually a fixture
felliott May 5, 2024
b304998
silence pytest warning; return True will be an error
felliott May 5, 2024
bd25e7e
silence warnings for osf app config
felliott May 5, 2024
a1f4a53
silence warnings for addon app configs
felliott May 5, 2024
4f64dfd
replace ugettext_lazy with gettext_lazy to silence dep warnings
felliott May 5, 2024
cf99f34
replace django urlquote with urllib quote to silence warnings
felliott May 6, 2024
aecd0fc
silence test warnings for non-test classes called 'Test*'
felliott May 6, 2024
b264d97
Merge branch 'feature/pyup-misc-fixes' into feature/python-upgrade
felliott May 6, 2024
fe9e823
- fix test_link_repo_registration test;
ly-mariia May 5, 2024
392cce4
- fix settings conflict;
ly-mariia May 5, 2024
8582959
- fix test_link_repo_registration test;
ly-mariia May 6, 2024
de19605
- fix test_get_refs_registered_missing_branch test;
ly-mariia May 6, 2024
b9c71e3
- fix test_before_page_load_osf_public_gh_public test;
ly-mariia May 6, 2024
5d37516
- fix tests from classes TestCallbacks and TestNodeSettings;
ly-mariia May 6, 2024
368a119
- fixes according to PEP8;
ly-mariia May 6, 2024
f0c3ef6
Merge branch 'feature/github-gitlab-fixes' into feature/python-upgrade
felliott May 6, 2024
5a4c494
fixed affected tests
opaduchak May 6, 2024
c9c3a8e
skipped one more test due to celery 5.0 synchronous retries
opaduchak May 6, 2024
5f1fa27
Merge branch 'fix/ENG-5531' into feature/python-upgrade
cslzchen May 7, 2024
6d67329
Fix invalid HTML in tests to fix bleach sanitization issue
cslzchen May 9, 2024
153fb4e
Merge branch 'fix/ENG-5514' into feature/python-upgrade
cslzchen May 9, 2024
96addbb
fixed several OTP-related tests
opaduchak May 10, 2024
4b7a2f4
fixed test with otp drift
opaduchak May 10, 2024
ca2b4d0
changed permissions for jobs in ci, to fix test reporting in PR jobs
opaduchak May 10, 2024
50ec1de
removed test reports from PR, because they do not work when PRs are s…
opaduchak May 10, 2024
b78c410
Merge branch 'ENG-5587' into feature/python-upgrade
cslzchen May 13, 2024
9a3f793
- fix errors for test_external_login_confirm_email_get_duped_id and t…
ly-mariia Apr 30, 2024
3089868
- fix errors for test_download_file_with_token and test_download_file…
ly-mariia Apr 30, 2024
4720a20
- fix status code error for test_external_login_confirm_email_get_lin…
ly-mariia Apr 30, 2024
cbc1ca5
- removed the extra comma;
ly-mariia May 9, 2024
ea77e2e
- fix test_download_file_with_token tests;
ly-mariia May 9, 2024
70fc8f1
- fix error request.authorization;
ly-mariia May 9, 2024
c64c4fb
- update guid;
ly-mariia May 14, 2024
e7b2050
Merge branch 'feature/ENG-5553' into feature/python-upgrade
cslzchen May 14, 2024
1d42a5a
- replace json with data;
ly-mariia May 14, 2024
4c56131
Merge branch 'feature/ENG-5588' into feature/python-upgrade
cslzchen May 14, 2024
0da3db1
fixed test containing invalid status code
opaduchak May 14, 2024
1cd73ad
Merge branch 'ENG-5604' into feature/python-upgrade
cslzchen May 15, 2024
35d5512
fixed conflicts
opaduchak May 15, 2024
800b95d
fixed jwt token encryption
opaduchak May 15, 2024
bfc35c4
fixed import order
opaduchak May 20, 2024
baba6ef
Merge pull request #10618 from opaduchak/feature/develop-updates
cslzchen May 21, 2024
e6794b8
bumped django along with sentry
opaduchak May 17, 2024
5167467
removed deprecated urls and fixed csrf_token generation
opaduchak May 17, 2024
37cdd3c
fixed invalid re_path imports
opaduchak May 17, 2024
1b5ba8f
fixed one failed re_path fix
opaduchak May 17, 2024
17101c7
fixed more instances of misimported re_path
opaduchak May 17, 2024
bc989da
fixed is_ajax and other minor import fixes
opaduchak May 17, 2024
68a8e47
fixed pytz timezone instead of datetime, fixed sentry mocks
opaduchak May 17, 2024
9150450
fixed unused import
opaduchak May 17, 2024
08a29aa
bumped Django to 4.2
opaduchak May 21, 2024
c749434
fixed token santitization
opaduchak May 21, 2024
2a0b3aa
fixed AuthUserFactory not saving instance if there are no emails
opaduchak May 22, 2024
810b3db
fixed AuthUserFactory to crating instance cause of absence of password
opaduchak May 22, 2024
a244236
more fixed to auth user factory
opaduchak May 22, 2024
b7b1408
fixed adding emails before save
opaduchak May 22, 2024
0fd3bd1
fixed unused imports
opaduchak May 23, 2024
7f7799f
Merge branch 'ENG-5550' into feature/python-upgrade
cslzchen May 23, 2024
3904e28
added crutch to allow to use CSRF middleware inside of OSFSessionAuth…
opaduchak May 20, 2024
b09ab7a
Merge branch 'ENG-5639' into feature/python-upgrade
cslzchen May 23, 2024
1e95c3e
- fix test_update_two_factor_enabled test;
ly-mariia May 23, 2024
2045954
- add a commas;
ly-mariia May 23, 2024
00603b6
- reverse the change;
ly-mariia May 23, 2024
ef53555
- fix error AttributeError: 'NoneType' object has no attribute 'lower';
ly-mariia May 23, 2024
7b2c076
- fix with value 1 and 0;
ly-mariia May 24, 2024
99c9bb3
- add comment;
ly-mariia May 24, 2024
bd0cb46
Revert bug-fixing unrelated style changes
cslzchen May 27, 2024
346e938
Merge branch 'feature/ENG-5637' into feature/python-upgrade
cslzchen May 27, 2024
8a63f48
bumped ci to 3.11
opaduchak May 22, 2024
1f27a1d
bumped ci to 3.12
opaduchak May 22, 2024
c9f238f
bumped pre-commit to reset cache on ci
opaduchak May 22, 2024
1596fb6
bumped python to 3.11 in pre-commit
opaduchak May 22, 2024
61e691e
removed asynctest
opaduchak May 22, 2024
ac127bb
ported fixes from 3.11 branch
opaduchak May 22, 2024
e298b78
got rid of distutils
opaduchak May 22, 2024
cabc19b
fixed inspect
opaduchak May 22, 2024
0f4ede1
fixed setuptools
opaduchak May 22, 2024
6de1b09
removed old setuptools from requirements
opaduchak May 22, 2024
20ee6ad
fixed pre-commit hooks
opaduchak May 22, 2024
f4cfef3
removed boto in favour of boto3
opaduchak May 23, 2024
bdae661
fixed test containing invalid import
opaduchak May 23, 2024
4969554
fixed mongodb for live edit, fixed using called-with which was remove…
opaduchak May 23, 2024
512c869
fixed leftover usage of called_with which was removed in python 3.12
opaduchak May 23, 2024
c48db62
marked called_with tests as broken
opaduchak May 23, 2024
7760369
fixed docker-compose, fixed called_with for tests that do pass
opaduchak May 24, 2024
44b14b1
fixed two more develop tests, removed skips related to already broken…
opaduchak May 29, 2024
3b2ca45
removed leftover comments, enforced python compile success, added pac…
opaduchak May 29, 2024
492d249
fixed comments
opaduchak May 30, 2024
a8ce147
removed comment as for Longze's suggestions
opaduchak May 30, 2024
a3303b5
Merge branch 'ENG-5646-3.12' into feature/python-upgrade
cslzchen May 31, 2024
f0fa6aa
fixed requirements for python 3.12
opaduchak Jun 6, 2024
0a9e458
Merge branch 'feature/fix-py3.12-compile' into feature/python-upgrade
felliott Jun 6, 2024
e605d6d
fixed portion of previously broken tests
opaduchak May 30, 2024
e9e1d10
Merge branch 'ENG-5696' into feature/python-upgrade
cslzchen Jun 6, 2024
b3bb6a7
fixed osf_tests/test_archiver.py::TestArchiverTasks.test_archive_addo…
opaduchak Jun 6, 2024
87665ed
fixed tests related to archive_node for osf_storage and dropbox
opaduchak Jun 7, 2024
bff0512
Merge branch 'feature/fix-archiver-tests' into feature/python-upgrade
felliott Jun 8, 2024
23da4f4
fixed test_GET_approve_with_valid_token_redirects: for token_action c…
opaduchak Jun 7, 2024
744eab2
Merge branch 'feature/fix-token-redirects' into feature/python-upgrade
felliott Jun 8, 2024
8c20bb7
fixed s3 failures when setting up addon (not when browsing files)
opaduchak Jun 12, 2024
f7aeefe
Merge branch 'feature/s3-setup-fix' into feature/python-upgrade
felliott Jun 14, 2024
2f0226c
fixed box addon setup
opaduchak Jun 13, 2024
9a3554f
removed state as it wasn't needed
opaduchak Jun 13, 2024
64cf539
Merge branch 'feature/box-client-fix' into feature/python-upgrade
felliott Jun 14, 2024
353c536
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott Jun 19, 2024
26e7b9d
i forgot to flake
felliott Jun 19, 2024
6a08399
Merge branch 'feature/shame-on-me' into feature/python-upgrade
felliott Jun 19, 2024
8331d96
switch to poetry for dep management
opaduchak May 29, 2024
af0b559
Merge branch 'feature/poetry' into feature/python-upgrade
felliott Jun 19, 2024
11190f0
remove unused files
felliott Jun 19, 2024
9a88b30
Merge branch 'feature/remove-obsolete-file' into feature/python-upgrade
felliott Jun 19, 2024
1458262
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott Jun 23, 2024
f43096f
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott Jun 24, 2024
b013d7b
fixed project metrics not being collected
opaduchak Jun 26, 2024
7b4126b
modernized if statement
opaduchak Jun 26, 2024
f47ed16
Merge branch 'feature/fix-metrics' into feature/python-upgrade
felliott Jun 30, 2024
8047519
fork admin's django-webpack-loader dep
felliott Jun 30, 2024
da49c86
Merge branch 'feature/fix-admin-pin-djwl' into feature/python-upgrade
felliott Jul 4, 2024
bcbffde
responding to python-upgrade cr
felliott Jun 30, 2024
eb2badf
Merge branch 'feature/python-upgrade-cr' into feature/python-upgrade
felliott Jul 11, 2024
c4b6463
Merge remote-tracking branch 'cos/develop' into feature/python-upgrade
felliott Jul 14, 2024
efed3c9
New django 4.2 migrations
felliott Jul 15, 2024
a1d6de5
Merge branch 'feature/dj4.2-migrations' into feature/python-upgrade
felliott Jul 16, 2024
3863fa9
fix sendgrid module usage
felliott Jul 16, 2024
6b32642
Merge branch 'feature/unbreak-sendgrid' into feature/python-upgrade
felliott Jul 17, 2024
12d1db4
remove celery setup_security()
felliott Jul 17, 2024
f9c4dae
Merge branch 'feature/celery-config' into feature/python-upgrade
felliott Jul 17, 2024
12e28b1
remove obsolete gevent monkeypatches
felliott Jul 17, 2024
635dff4
Merge branch 'feature/remove-gevent-monkeypatch' into feature/python-…
felliott Jul 17, 2024
11b62d4
manually init newrelic, since newrelic-admin is bork
felliott Jul 17, 2024
f8f1e1e
update celery's max-tasks-per-child arg
felliott Jul 17, 2024
c285ed4
Merge branch 'feature/no-newrelic-admin' into feature/python-upgrade
felliott Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .github/actions/gen-report/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Generate Report'
description: 'Generate test report from junit xml file'
runs:
using: "composite"
steps:
- name: Generate Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: ${{github.job}} REPORT # Name of the check run which will be created
path: report.xml # Path to test results
reporter: java-junit # Format of test results
max-annotations: 49
list-tests: failed
list-suites: failed
35 changes: 26 additions & 9 deletions .github/actions/start-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ description: 'Last composite action before tests are run'
runs:
using: "composite"
steps:
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('poetry.lock') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install lxml
shell: bash
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- name: Copy Settings
shell: bash
run: |
Expand All @@ -13,19 +34,15 @@ runs:
- name: PIP install
shell: bash
run: |
pip install --upgrade pip
pip install invoke==0.13.0
pip install flake8==2.4.0 --force-reinstall --upgrade
pip install wheel
invoke wheelhouse --dev --addons
# pinned pip to 21.0a and setuptools<58.0.0 as current dependencies do not build on newer versions of pip and setuptools
pip install poetry==1.8.0
poetry install --no-root --without release
- name: Other installs
shell: bash
run: |
pip install psycopg2==2.7.3 --no-binary psycopg2
invoke travis_addon_settings
invoke requirements --dev --addons
# bumped psycopg to match requirements.txt, as otherwise build would fail
poetry run python3 -m invoke travis-addon-settings
pip uninstall uritemplate.py --yes
pip install uritemplate.py==0.3.0
# use yarn add --exact to match versions in yarn.lock w/o installing all deps
yarn add --exact bower@^1.8.8
yarn add --exact @centerforopenscience/list-of-licenses@^1.1.0
Expand Down
143 changes: 31 additions & 112 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ jobs:
addons:
runs-on: ubuntu-20.04
needs: build-cache
permissions:
checks: write
services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -49,37 +50,21 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('**/requirements.txt') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install lxml
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- uses: ./.github/actions/start-build
- name: Run tests
run: invoke test_travis_addons -n 1
run: poetry run python3 -m invoke test-travis-addons -n 1 --junit
- name: Upload report
if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report

website:
runs-on: ubuntu-20.04
needs: build-cache
permissions:
checks: write
services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -92,37 +77,21 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('**/requirements.txt') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install lxml
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- uses: ./.github/actions/start-build
- name: Run tests
run: invoke test_travis_website -n 1
run: poetry run python3 -m invoke test-travis-website -n 1 --junit
- name: Upload report
if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report

api1_and_js:
runs-on: ubuntu-20.04
needs: build-cache
permissions:
checks: write
services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -135,40 +104,23 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('**/requirements.txt') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install lxml
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- uses: ./.github/actions/start-build
- name: NVM & yarn install
run: |
invoke assets --dev
run: poetry run python3 -m invoke assets --dev
- name: Run test
run: invoke test_travis_api1_and_js -n 1
run: poetry run python3 -m invoke test-travis-api1-and-js -n 1 --junit
- name: Upload report
if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report

api2:
runs-on: ubuntu-20.04
needs: build-cache
permissions:
checks: write
services:
postgres:
image: postgres

env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -181,32 +133,17 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('**/requirements.txt') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install lxml
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- uses: ./.github/actions/start-build
- name: Run tests
run: invoke test_travis_api2 -n 1
run: poetry run python3 -m invoke test-travis-api2 -n 1 --junit
- name: Upload report
if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report

api3_and_osf:
runs-on: ubuntu-20.04
permissions:
checks: write
needs: build-cache
services:
postgres:
Expand All @@ -224,27 +161,9 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v2
- id: cache-objects
uses: actions/cache@v2
with:
path: ~/.cache
key: reqs_${{ hashFiles('**/requirements.txt') }}
restore-keys: reqs_
- uses: ./.github/actions/build-es
with:
ELASTICSEARCH_ARCHIVE: ${{ env.ELASTICSEARCH_ARCHIVE }}
- uses: ./.github/actions/build-es6
with:
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install lxml
run: |
sudo apt update
sudo apt-get install libxml2-dev libxslt-dev python-dev
- uses: ./.github/actions/start-build
- name: Run tests
run: invoke test_travis_api3_and_osf -n 1

run: poetry run python3 -m invoke test-travis-api3-and-osf -n 1 --junit
- name: Upload report
if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed
uses: ./.github/actions/gen-report
15 changes: 9 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
default_language_version:
python: python3.6
python: python3.12
repos:
- repo: https://github.com/asottile/add-trailing-comma
rev: v0.7.0
rev: v3.1.0
hooks:
- id: add-trailing-comma
# TODO: Remove this line. For now, we only format the api/ directory
files: ^api/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
rev: v4.6.0
hooks:
- id: double-quote-string-fixer
- id: trailing-whitespace
exclude: "^(website/static/vendor/|osf/metadata/definitions/.*\\.xsd)"
- id: flake8
additional_dependencies: ["flake8==3.6.0", "flake8-mutable==1.2.0"]
- repo: https://github.com/pycqa/flake8
rev: '7.0.0' # pick a git hash / tag to point to
hooks:
- id: flake8
additional_dependencies: ["flake8-mutable==1.2.0"]
- repo: https://github.com/pre-commit/mirrors-jshint
rev: v2.9.6
rev: v2.13.6
hooks:
- id: jshint
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
language: python

python:
- "3.6"
- "3.10"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.12?

Also, since we're using GHA in favor of TCI, this file could probably be deleted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be covered by Phase X ticket: https://openscience.atlassian.net/browse/ENG-5753


dist: trusty

Expand Down Expand Up @@ -132,7 +132,7 @@ install:

- travis_retry pip install --upgrade pip
- travis_retry pip install invoke==0.13.0
- travis_retry pip install flake8==2.4.0 --force-reinstall --upgrade
- travis_retry pip install flake8==7.0.0 --force-reinstall --upgrade
- travis_retry invoke wheelhouse --dev --addons

- |
Expand All @@ -145,7 +145,8 @@ install:
fi
- travis_retry invoke travis_addon_settings
- travis_retry pip install psycopg2==2.7.3 --no-binary psycopg2
# bumped psycopg to match requirements.txt, as otherwise build would fail
- travis_retry pip install psycopg2==2.9.9 --no-binary psycopg2
- travis_retry invoke requirements --dev --addons
# Hack to fix package conflict between uritemplate and uritemplate.py (dependency of github3.py)
- pip uninstall uritemplate.py --yes
Expand Down
Loading
Loading