Skip to content

Commit

Permalink
Merge pull request #3 from astares/ci
Browse files Browse the repository at this point in the history
Add CI
  • Loading branch information
astares committed Sep 16, 2023
2 parents 1fb8c29 + 5f15028 commit bc22360
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bash needs lf even on windows/cygwin
*.st eol=lf
*.sh eol=lf

# st files are always text, even if they contain invalid encoded chars
*.st text diff

# GitHub is unable to properly detect Smalltalk code, so help it a bit
*.st linguist-language=Smalltalk
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on: [push,pull_request,workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-11 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v3
- name: Install EJDB
run: ./scripts/install-EJDB.sh
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.unit-tests.ston
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
name: ${{matrix.os}}-${{matrix.smalltalk}}
token: ${{ secrets.CODECOV_TOKEN }}
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# changes file
*.changes
*.chg

# system image
*.image
*.img7
*.img

# Pharo Smalltalk Debug log file
PharoDebug.log

# Squeak Smalltalk Debug log file
SqueakDebug.log

# Dolphin Smalltalk source file
*.sml

# Dolphin Smalltalk error file
*.errors

# Monticello package cache
/package-cache

# playground cache
/play-cache
/play-stash

# Metacello-github cache
/github-cache
github-*.zip
16 changes: 16 additions & 0 deletions .smalltalkci/.unit-tests.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'EJDB',
#directory : '../src',
#load : [ 'CI' ],
#platforms : [ #pharo ]
}
],
#testing : {
#coverage : {
#packages : [ 'EJDB*' ],
#format: #lcov
}
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pharo-EJDB
Pharo-EJDB
======

Pharo bindings for https://github.com/Softmotions/ejdb
[Pharo](https://www.pharo.org) bindings for https://github.com/Softmotions/ejdb

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

# Install cmake
sudo apt-get -y install cmake

# Clone project from https://github.com/Softmotions/ejdb
git clone --recurse-submodules https://github.com/Softmotions/ejdb.git

# Build and install
cd ejdb
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
sudo make install
16 changes: 14 additions & 2 deletions src/BaselineOfEJDB/BaselineOfEJDB.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
"
Baseline for [https://github.com/pharo-nosql/pharo-ejdb](https://github.com/pharo-nosql/pharo-ejdb)
"
Class {
#name : #BaselineOfEJDB,
#superclass : #BaselineOf,
#category : #BaselineOfEJDB
#category : #'BaselineOfEJDB-Base'
}

{ #category : #baselines }
BaselineOfEJDB >> baseline: spec [
<baseline>

spec for: #common do: [
"Packages"
spec
package: 'EJDB';
package: 'EJDB-Tests' ]
package: 'EJDB-Tests' with: [ spec requires: #('EJDB' ) ].

"Groups"
spec
group: 'Core' with: #('EJDB' );
group: 'Tests' with: #('EJDB-Tests');
group: 'CI' with: #('Tests');
group: 'all' with: #('Core' 'Tests');
group: 'default' with: #('all') ]
]
15 changes: 15 additions & 0 deletions src/BaselineOfEJDB/ManifestBaselineOfEJDB.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"
Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser
"
Class {
#name : #ManifestBaselineOfEJDB,
#superclass : #PackageManifest,
#category : #'BaselineOfEJDB-Manifest'
}

{ #category : #'code-critics' }
ManifestBaselineOfEJDB class >> ruleClassNotReferencedRuleV1FalsePositive [

<ignoreForCoverage>
^ #(#(#(#RGClassDefinition #(#BaselineOfEJDB)) #'2023-09-16T15:54:25.77682+02:00') )
]

0 comments on commit bc22360

Please sign in to comment.