Skip to content

Commit

Permalink
ci: move to GitHub actions and Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
michalc committed Aug 19, 2023
1 parent aac52bd commit 86e0251
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 85 deletions.
84 changes: 0 additions & 84 deletions .circleci/config.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
name: Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version:
- "3.7.13"
- "3.8.12"
- "3.9.12"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: '${{ matrix.python-version }}'
- name: "Start MinIO"
run: ./start-minio.sh
- name: "Install package and python dependencies"
run: |
pip install .[dev]
pip install https://github.com/rogerbinns/apsw/releases/download/3.36.0-r1/apsw-3.36.0-r1.zip --global-option=fetch --global-option=--version --global-option=3.36.0 --global-option=--sqlite --global-option=build --global-option=--enable-all-extensions
- name: "Test"
run: |
pytest --cov
- uses: codecov/codecov-action@v3
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# sqlite-s3vfs [![CircleCI](https://circleci.com/gh/uktrade/sqlite-s3vfs.svg?style=shield)](https://circleci.com/gh/uktrade/sqlite-s3vfs) [![Test Coverage](https://api.codeclimate.com/v1/badges/6df8a84b0ff21d7ecf22/test_coverage)](https://codeclimate.com/github/uktrade/sqlite-s3vfs/test_coverage)
# sqlite-s3vfs

[![PyPI package](https://img.shields.io/pypi/v/sqlite-s3vfs?label=PyPI%20package&color=%234c1)](https://pypi.org/project/sqlite-s3vfs/) [![Test suite](https://img.shields.io/github/actions/workflow/status/uktrade/sqlite-s3vfs/test.yml?label=Test%20suite)](https://github.com/uktrade/sqlite-s3vfs/actions/workflows/test.yml) [![Code coverage](https://img.shields.io/codecov/c/github/uktrade/sqlite-s3vfs?label=Code%20coverage)](https://app.codecov.io/gh/uktrade/sqlite-s3vfs)

Python virtual filesystem for SQLite to read from and write to S3.

Expand Down
1 change: 1 addition & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
35 changes: 35 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "sqlite-s3vfs"
version = "0.0.0.dev0"
authors = [
{ name="Department for International Trade", email="sre@digital.trade.gov.uk" },
]
description = "Virtual filesystem for SQLite to read from and write to S3"
readme = "README.md"
requires-python = ">=3.7.11"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Topic :: Database",
]
dependencies = [
"boto3>=1.18.51",
]

[project.optional-dependencies]
dev = [
"pytest>=6.2.5",
"pytest-cov>=3.0.0",
]

[project.urls]
"Homepage" = "https://github.com/uktrade/sqlite-s3vfs"

[tool.hatch.build]
include = [
"sqlite_s3vfs.py",
]
2 changes: 2 additions & 0 deletions start-minio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ docker run --rm -p 9000:9000 --name sqlite-s3vfs-minio -d \
mkdir -p /data4 &&
minio server /data{1...4}
'

timeout 60 bash -c 'until echo > /dev/tcp/127.0.0.1/9000; do sleep 5; done'

0 comments on commit 86e0251

Please sign in to comment.