Skip to content

Commit

Permalink
Add GitHub Actions to test the integration with Glorp
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Jul 22, 2020
1 parent 6611bcd commit 4ae8c40
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .GLORP.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'SQLite3',
#directory : 'src',
#load : [ 'CI' ],
#platforms : [ #pharo ]
}
],
#postLoading : [
'scripts/setupSQLite3AsDatabaseDriver.st'
],
#testing : {
#packages : [ 'Glorp-Integration-Tests' ]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.st linguist-language=Smalltalk
33 changes: 33 additions & 0 deletions .github/workflows/glorp-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GLORP Integration Tests

on: [push,pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-8.0 ]
name: ${{ matrix.smalltalk }} + ${{ matrix.rdbms }}
steps:
- uses: actions/checkout@v2
- name: Install SQLite3
run: ./scripts/install-SQLite3.sh
env:
RDBMS: ${{ matrix.rdbms }}
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-version: ${{ matrix.smalltalk }}
- name: Load Image and Run Integration Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .GLORP.ston
timeout-minutes: 15
env:
RDBMS: ${{ matrix.rdbms }}
- run: echo "::set-env name=SCI_COVERAGE_FILE_LOCATION::${HOME}/.smalltalkCI/_builds/coveralls_results.json"
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ env.SCI_COVERAGE_FILE_LOCATION }}
13 changes: 13 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Shellcheck

on: [push,pull_request]

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2008-2019 Pharo community
Copyright (c) 2008-2020 Pharo RBMS Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Pharo-SQlite3
[![Build Status](https://travis-ci.org/pharo-rdbms/Pharo-SQLite3.svg?branch=master)](https://travis-ci.org/pharo-rdbms/Pharo-SQLite3)
[![GLORP Integration Tests](https://github.com/pharo-rdbms/Pharo-SQLite3/workflows/GLORP%20Integration%20Tests/badge.svg?branch=master)](https://github.com/pharo-rdbms/Pharo-SQLite3/actions?query=workflow%3AGLORP%20Integration%20Tests)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Pharo version](https://img.shields.io/badge/Pharo-6.1-%23aac9ff.svg)](https://pharo.org/download)
[![Pharo version](https://img.shields.io/badge/Pharo-7.0-%23aac9ff.svg)](https://pharo.org/download)
Expand All @@ -17,12 +18,12 @@ Standalone [SQLite3](https://www.sqlite.org) database binding for [Pharo](http:/
* [License](#license)
* [Migration](#migration)

# Quick Start
# Quick Start

## Installation

```Smalltalk
Metacello new
Metacello new
repository: 'github://pharo-rdbms/Pharo-SQLite3/src';
baseline: 'SQLite3';
load
Expand All @@ -42,15 +43,15 @@ The project goes back to a binding to SQLite database for Squeak later ported to

The full history is described in the [history details](doc/history.md).

# Roadmap
# Roadmap

- Implement support for
[SQLcipher](https://github.com/sqlcipher/sqlcipher). This was available
in NBSQLite, the SQLite binding using Pharo 4's NativeBoost FFI.

- Implement driver for [Voyage](https://github.com/pharo-nosql/voyage).
- Implement driver for [Voyage](https://github.com/pharo-nosql/voyage).

# Contributors
# Contributors

Contributors in order of appearance:

Expand All @@ -70,4 +71,3 @@ Contributors in order of appearance:
## Migration

If you want to migrate your code from an older SQLite binding then check the [Migration Guide](doc/migration.md).

5 changes: 5 additions & 0 deletions scripts/install-SQLite3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

sudo apt-get --assume-yes --no-install-recommends install sqlite3
sqlite3 -version
ln -s /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 libsqlite3.so
8 changes: 8 additions & 0 deletions scripts/setupSQLite3AsDatabaseDriver.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DatabaseAccessor classForThisPlatform DefaultDriver: SQLite3Driver.
GlorpDatabaseLoginResource defaultLogin:
(Login new
database: UDBCSQLite3Platform new;
host: SmalltalkImage current imageDirectory fullName;
databaseName: 'sodbxtestu.db';
password: '';
yourself).
8 changes: 4 additions & 4 deletions src/BaselineOfSQLite3/BaselineOfSQLite3.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ BaselineOfSQLite3 >> baseline: spec [
spec
for: #pharo
do: [ spec blessing: #baseline.
self setUpDependencies: spec.
self setUpDependencies: spec.
"Packages"
spec
package: 'SQLite3-Core';
package: 'SQLite3-Core-Benchmarks' with: [ spec requires: #('SQLite3-Core') ];
package: 'SQLite3-Core-Tests' with: [ spec requires: #('SQLite3-Core') ];
package: 'SQLite3-Glorp' with: [ spec requires: #('SQlite3-Core' 'Glorp-Core') ].
package: 'SQLite3-Glorp' with: [ spec requires: #('SQLite3-Core' 'Glorp-Core') ].
"Groups"
spec
group: 'Core' with: #('SQLite3-Core');
group: 'Tests' with: #('SQLite3-Core-Tests');
group: 'Benchmarks' with: #('SQLite3-Core-Tests');
group: 'Glorp' with: 'SQLite3-Glorp';
group: 'Benchmarks' with: #('SQLite3-Core-Benchmarks');
group: 'glorp' with: 'SQLite3-Glorp';
group: 'CI' with: #('SQLite3-Glorp' 'Glorp-Tests' 'Tests');
group: 'all' with: #('Core' 'Tests' 'Benchmarks');
group: 'default' with: #('all')
Expand Down

0 comments on commit 4ae8c40

Please sign in to comment.