Skip to content

[fix][s]: Fix s3filestore for 2.9 IResourceController #3

[fix][s]: Fix s3filestore for 2.9 IResourceController

[fix][s]: Fix s3filestore for 2.9 IResourceController #3

Workflow file for this run

name: CI
on:
push:
branches: main
tags:
- 'v*'
pull_request:
branches: main
env:
CKANVERSION: 2.9
jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 . --count --max-complexity=12 --max-line-length=127 --statistics --exclude ckan,ckanext-s3filestore
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8' ]
name: Python ${{ matrix.python-version }} extension test
services:
postgresql:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
ckan-solr:
# Workflow level env variables are not addressable on job level, only on steps level
# image: ghcr.io/keitaroinc/ckan-solr-dev:{{ env.CKANVERSION }}
image: ghcr.io/keitaroinc/ckan-solr-dev:2.9
ports:
- 8983:8983
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install pytest
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Setup CKAN
env:
PGPASSWORD: postgres
run: |
bash bin/setup-ckan.bash
- name: Test with pytest
run: |
pytest --ckan-ini=subdir/test.ini --cov=ckanext.s3filestore --disable-warnings ckanext/s3filestore/tests
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Python ${{ matrix.python-version }} Unit Test
publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install setup requirements
run: |
python -m pip install --upgrade setuptools wheel twine
- name: Build and package
run: |
python setup.py sdist bdist_wheel
twine check dist/*
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true