diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62e2d671..ffe8c2c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,34 +1,44 @@ name: Tests -on: [push, pull_request] +on: [pull_request] jobs: lint: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [ "3.10" ] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: - python-version: "3.8" + python-version: ${{ matrix.python-version }} - name: Install requirements run: pip install flake8 pycodestyle - name: Check syntax run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude ckan test: - needs: lint + name: CKAN ${{ matrix.ckan-version }} + runs-on: ubuntu-latest strategy: - matrix: - ckan-version: [2.9] fail-fast: false + matrix: + include: + - ckan-version: "ckan-dev:2.10-py3.10" + ckan-postgres-version: "2.10" + ckan-solr-version: "2.10" + - ckan-version: "ckan-dev:2.11-py3.10" + ckan-postgres-version: "2.11" + ckan-solr-version: "2.11-solr9" - name: CKAN ${{ matrix.ckan-version }} - runs-on: ubuntu-latest container: - image: openknowledge/ckan-dev:${{ matrix.ckan-version }} + image: ckan/${{ matrix.ckan-version }} + options: --user root services: solr: - image: ckan/ckan-solr-dev:${{ matrix.ckan-version }} + image: ckan/ckan-solr:${{ matrix.ckan-solr-version }} postgres: - image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }} + image: ckan/ckan-postgres-dev:${{ matrix.ckan-postgres-version }} env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -44,13 +54,11 @@ jobs: CKAN_REDIS_URL: redis://redis:6379/1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Install requirements run: | pip install -r dev-requirements.txt pip install -r requirements.txt - pip install --no-warn-conflicts jinja2==2.10.1 - pip install --no-warn-conflicts markupsafe==2.0.1 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