11name : Cypress
22on :
3- workflow_dispatch : # (canada fork only): disable Core repo workflows
4- # on: [pull_request]
3+ # pull_request:
4+ workflow_call :
5+ workflow_dispatch :
56env :
67 NODE_VERSION : ' 16'
7- PYTHON_VERSION : ' 3.8 '
8+ PYTHON_VERSION : ' 3.9 '
89
910permissions :
1011 contents : read
1314 cypress :
1415 runs-on : ubuntu-latest
1516 services :
16- ckan-postgres :
17- image : postgres:10
17+ ckan_postgres :
18+ image : postgres:15
1819 ports :
1920 - 5432:5432
2021 options : >-
@@ -27,12 +28,12 @@ jobs:
2728 POSTGRES_PASSWORD : pass
2829 POSTGRES_DB : ckan_test
2930
30- ckan-redis :
31+ ckan_redis :
3132 image : redis
3233 ports :
3334 - 6379:6379
34- ckan-solr :
35- image : ckan/ckan-solr:master
35+ ckan_solr :
36+ image : ckan/ckan-solr:2.10-solr9
3637 ports :
3738 - 8983:8983
3839
@@ -46,30 +47,39 @@ jobs:
4647 - uses : actions/setup-python@v5
4748 with :
4849 python-version : ${{ env.PYTHON_VERSION }}
50+ cache : ' pip'
4951 - uses : actions/setup-node@v4
5052 with :
5153 node-version : ${{ env.NODE_VERSION }}
54+ cache : ' npm'
5255
5356 - name : Install python deps
54- run : pip install -r requirements.txt -r dev-requirements.txt -e.
57+ run : |
58+ pip install -U pip
59+ pip install -r requirements.txt -r dev-requirements.txt -e.
60+ pip check
5561
5662 - name : Init environment
5763 run : |
58- ckan -c test-core-cypress.ini db init
64+ ckan -c test-core-ci.ini db init
65+ #cypress testing requires activity plugin to be active
66+ ckan config-tool test-core-ci.ini "ckan.plugins = activity"
5967
6068 - name : Run Cypress
61- uses : cypress-io/github-action@v2
69+ uses : cypress-io/github-action@v6
6270 with :
63- start : ckan -c test-core-cypress .ini run
71+ start : ckan -c test-core-ci .ini run
6472
65- - uses : actions/upload-artifact@v1
73+ - uses : actions/upload-artifact@v4
6674 if : failure()
6775 with :
6876 name : cypress-screenshots
6977 path : cypress/screenshots
70- # Test run video was always captured, so this action uses "always()" condition
71- - uses : actions/upload-artifact@v1
72- if : always()
78+ if-no-files-found : ignore
79+
80+ - uses : actions/upload-artifact@v4
81+ if : failure()
7382 with :
7483 name : cypress-videos
7584 path : cypress/videos
85+ if-no-files-found : ignore
0 commit comments