Skip to content

ADX-1053 Show affiliation details in output of user_list #658

ADX-1053 Show affiliation details in output of user_list

ADX-1053 Show affiliation details in output of user_list #658

Workflow file for this run

name: Tests
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
run: |
flake8 . --count --max-line-length=127 --show-source --statistics
test:
name: CKAN
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ckan-container-version: "2.9"
ckan-postgres-version: "2.9"
ckan-solr-version: "2.9-solr8"
requirements-dev: "dev-requirements.py3.txt"
ckanext-requirements: |
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-scheming/development/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-validation/d83751760cd93836e4ca44b46ffb629907f06576/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-blob-storage/development/requirements.py3.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-versions/development/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-restricted/development/requirements.txt
- ckan-container-version: "2.10"
ckan-postgres-version: "2.10"
ckan-solr-version: "2.10"
requirements-dev: "dev-requirements.py3.txt"
ckanext-requirements: |
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-scheming/development/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-validation/d83751760cd93836e4ca44b46ffb629907f06576/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-blob-storage/development/requirements.py3.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-versions/development/requirements.txt
pip install -r https://raw.githubusercontent.com/fjelltopp/ckanext-restricted/development/requirements.txt
container:
image: openknowledge/ckan-dev:${{ matrix.ckan-container-version }}
services:
solr:
image: ckan/ckan-solr:${{ matrix.ckan-solr-version }}
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:3
env:
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
CKAN_SOLR_URL: http://solr:8983/solr/ckan
CKAN_REDIS_URL: redis://redis:6379/1
steps:
- uses: actions/checkout@v2
- uses: borales/[email protected]
with:
cmd: --cwd ckanext/unaids/react/ install
- uses: borales/[email protected]
with:
cmd: --cwd ckanext/unaids/react/ build
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r ${{ matrix.requirements-dev }}
pip install -e "git+https://github.com/fjelltopp/ckanext-scheming@development#egg=ckanext-scheming"
pip install -e "git+https://github.com/fjelltopp/ckanext-validation@development#egg=ckanext-validation"
pip install -e "git+https://github.com/datopian/ckanext-authz-service@bd4c80f55a714c1117a0e130d07463e383c494c7#egg=ckanext-authz-service"
pip install -e "git+https://github.com/ckan/[email protected]#egg=ckanext-pages"
pip install -e "git+https://github.com/fjelltopp/ckanext-blob-storage@development#egg=ckanext-blob-storage"
pip install -e "git+https://github.com/fjelltopp/ckanext-versions@development#egg=ckanext-versions"
pip install -e "git+https://github.com/fjelltopp/ckanext-restricted@development#egg=ckanext-restricted"
${{ matrix.ckanext-requirements }}
pip install -e .
# Replace default path to CKAN core config file with the one on the container
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
- name: Setup ckan db
run: ckan -c test.ini db init
- name: Run tests
run: pytest --ckan-ini=test.ini --cov=ckanext.unaids --disable-warnings ckanext/unaids/tests
test-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.14.2
- name: Setup extension
run: |
cd ./ckanext/unaids/react
yarn
yarn test --silent