Skip to content

Bump boto3 from 1.34.27 to 1.35.61 #2407

Bump boto3 from 1.34.27 to 1.35.61

Bump boto3 from 1.34.27 to 1.35.61 #2407

Workflow file for this run

name: ckanext-datagovuk ci
on:
workflow_dispatch:
push:
pull_request_target:
branches:
- main
types:
- closed
jobs:
codeql-sast:
name: CodeQL SAST scan
uses: alphagov/govuk-infrastructure/.github/workflows/codeql-analysis.yml@main
permissions:
security-events: write
dependency-review:
name: Dependency Review scan
uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main
test:
name: test
runs-on: ubuntu-latest
container:
image: ghcr.io/alphagov/ckan:2.10.4-e-base
options: --user root
services:
solr:
image: ghcr.io/alphagov/solr:2.10-b
postgres:
image: postgis/postgis:13-3.1-alpine
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_SOLR_URL: http://solr:8983/solr/ckan
CKAN_REDIS_URL: redis://redis:6379/1
CKAN_SITE_URL: http://test.ckan.net
PGPASSWORD: postgres
CRYPTOGRAPHY_DONT_BUILD_RUST: 1
TZ: UTC
steps:
- uses: actions/checkout@v3
- name: Create Database
run: |
psql --host=postgres --username=postgres --command="CREATE USER ckan_default WITH PASSWORD 'pass' NOSUPERUSER NOCREATEDB NOCREATEROLE;"
createdb --encoding=utf-8 --host=postgres --username=postgres --owner=ckan_default ckan_test
psql --host=postgres --username=postgres -d ckan_test -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;"
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install flask prometheus exporter
run: pip install prometheus-flask-exporter==0.20.3
- name: Install requirements (ckanext-datagovuk)
run: |
pip install -r requirements.txt
pip install -e .
- name: Install dev requirements
run: |
pip install -r dev-requirements.txt
- name: Update config
run: |
# Replace default path to CKAN core config file with the one on the container
sed -i -e 's|use = config:.*|use = config:/usr/lib/ckan/venv/src/ckan/test-core.ini|' test.ini
# set the i18n directory
sed -i -e "s|ckan.i18n_directory = .*$|ckan.i18n_directory = $CKAN_VENV/src/ckanext-datagovuk/ckanext/datagovuk/i18n|" ${CKAN_CONFIG}/production.ini
- name: Init Database
run: |
ckan db init
- name: Run tests
run: pytest --ckan-ini=test.ini ckanext/datagovuk/tests --cov=ckanext.datagovuk --cov-report=term-missing --disable-pytest-warnings -v