Skip to content

[skip/helpers] Add join_one()/join_many() helpers. #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4,258 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4258 commits
Select commit Hold shift + click to select a range
fb8a4e4
Handle postgres time-stamp types (#730)
bennostein Feb 5, 2025
baa0547
[skiprutime] Fix issue #633
skiplabsdaniel Feb 5, 2025
4fe8b1b
[skiprutime] Fix issue #633 (#729)
skiplabsdaniel Feb 5, 2025
11f2538
Fix Makefile typo OPT->OTP
bennostein Feb 4, 2025
c04fc1d
Add NPM package READMEs
bennostein Feb 4, 2025
59ff552
NPM Package READMEs (#722)
bennostein Feb 5, 2025
80bf200
Add hubspot tracking to docs site
jberdine Feb 5, 2025
8b6438e
Add hubspot tracking to docs site (#731)
jberdine Feb 5, 2025
da2c3f9
Bump all core package versions (@skiplang/*, @skip-wasm/*)
bennostein Feb 4, 2025
32e4217
Bump Skip runtime packages, skipping some versions to synchronize at …
bennostein Feb 4, 2025
fb877f8
Update package-lock.json
bennostein Feb 4, 2025
3540d0b
Bump skdb wasm test timeout
bennostein Feb 5, 2025
c4ed64a
Update NPM package versions (#723)
bennostein Feb 5, 2025
508b255
[examples/hackernews] Explicit `Dockerfile`s for `db` and `load_balan…
beauby Feb 6, 2025
57fe3da
[examples/hackernews] Fix `runService()` call following #668.
beauby Feb 6, 2025
e7b9319
[ci] Add hackernews example to CI.
beauby Jan 30, 2025
14c04d5
[ci] Add hackernews example to CI. (#703)
beauby Feb 6, 2025
2cc5df0
Differentiate between internal and public packets
skiplabsdaniel Jan 23, 2025
b86652f
[skdb] Fix Wasm tests
skiplabsdaniel Jan 23, 2025
c8fe93b
Reduce the number of package to publish (#686)
skiplabsdaniel Feb 6, 2025
2ea3553
[skiplang/skstore] Fix locking in `runWithGcIntern`.
beauby Jan 30, 2025
4d7731c
[skiplang/skstore] Fix locking in `runWithGcIntern`. (#702)
beauby Feb 7, 2025
9888543
Increase wait time so servers spin up fully before clients in example…
bennostein Feb 6, 2025
4d3ad67
De-flake skipruntime example expect-tests (#737)
bennostein Feb 7, 2025
b251b8b
Add git submodule for api docs site
jberdine Jan 30, 2025
af9c9e3
Config ripgrep to ignore generated docs files
jberdine Feb 3, 2025
200e918
Install rsync, used in api docs workflow
jberdine Jan 30, 2025
12d6fbb
Simplify docs workflow
jberdine Jan 30, 2025
9a503d5
Simplify docs workflow (#733)
jberdine Feb 7, 2025
c7be0d4
Fix build failures due to zombie symlinks
jberdine Feb 7, 2025
ce581fb
Fix build failures due to zombie symlinks (#738)
jberdine Feb 7, 2025
20b709b
Remove Websocket Dependency from @skip-wasm/std
skiplabsdaniel Jan 28, 2025
54227ef
Remove worker management from core wasm skiplang runtime
skiplabsdaniel Jan 28, 2025
4aa39cb
Use package.json properties to manage browser/node versions
skiplabsdaniel Jan 28, 2025
d1671c9
Some cleaning in packages (#735)
skiplabsdaniel Feb 10, 2025
e0414c1
Compute slot once
mbouaziz Feb 10, 2025
cf73f21
Fix slot requirements and use builtin if available
mbouaziz Feb 10, 2025
0a89668
Fix clz UB on 32 bit too
mbouaziz Feb 10, 2025
888b03b
Fix clz undefined behaviour (#742)
mbouaziz Feb 11, 2025
dc976ec
Refactor test_diff (part 1)
mbouaziz Feb 5, 2025
7bff633
Refactor test_diff (part 2)
mbouaziz Feb 5, 2025
8dd1dd3
Prepare for parallelization
mbouaziz Feb 5, 2025
78a33ea
Parallelize test_diff
mbouaziz Feb 5, 2025
382a2f1
Limit to 8 jobs on CircleCI
mbouaziz Feb 10, 2025
9f4412b
Parallelize test_diff (#727)
mbouaziz Feb 11, 2025
0bcf791
Revert "Add hubspot tracking to docs site"
jberdine Feb 10, 2025
a51d4f9
Revert "Add hubspot tracking to docs site" (#741)
jberdine Feb 11, 2025
a388c3a
Update alpha release blog post with metadata + new install string
bennostein Feb 11, 2025
452f6bf
Add "skip's origins" blog post
bennostein Feb 11, 2025
225ffd9
Add "why skip?" blog post
bennostein Feb 11, 2025
d7927d8
Pull in high-res images for "Why skip?" blog post
bennostein Feb 11, 2025
eaa73c1
Add link to Julien's twitter; tweak dates to order blog posts
bennostein Feb 11, 2025
72820a3
[www] Add blog posts to docusaurus site (#746)
bennostein Feb 11, 2025
feb7ce8
Bump docs-site submodule
bennostein Feb 11, 2025
89d77e6
Remove specialized Mappers
jberdine Feb 10, 2025
0e390f5
Extend groups example to include code in docs pages
jberdine Feb 10, 2025
e6d777d
Update docs after removing specialized Mappers, and other staleness
jberdine Feb 10, 2025
c5617e2
Remove specialized Mappers and update docs (#740)
jberdine Feb 12, 2025
75c6cf0
Bump docs_site submodule
jberdine Feb 12, 2025
1e8bc08
Reduce testPostgres false failure rate
skiplabsdaniel Feb 11, 2025
47ecfe8
Reduce testPostgres false failure rate (#747)
skiplabsdaniel Feb 12, 2025
61b30a3
Allow to run the examples in native
skiplabsdaniel Feb 11, 2025
3bf493b
Run the test example also with native platform
skiplabsdaniel Feb 11, 2025
40310b4
Fix order in some example
skiplabsdaniel Feb 11, 2025
f0c94a8
Run the example test with native platform (#743)
skiplabsdaniel Feb 12, 2025
b54e35e
Allow access to defaultParamEncoder
skiplabsdaniel Feb 12, 2025
d1f8a14
Allow access to defaultParamEncoder (#752)
skiplabsdaniel Feb 12, 2025
797f0a6
Fix up formatting of example script output
bennostein Feb 11, 2025
7c68258
Clean up Makefiles
bennostein Feb 11, 2025
2ead759
Clean up formatting and Make targets for native example tests (#750)
bennostein Feb 12, 2025
c0860f5
Add `GET /healthcheck` endpoint to skip control service
bennostein Feb 13, 2025
89cc167
Add `GET /healthcheck` endpoint to skip control service (#755)
bennostein Feb 13, 2025
483f3d9
Update api docs due to exporting defaultParamEncoder
jberdine Feb 13, 2025
0a85730
Update api docs due to exporting defaultParamEncoder (#756)
jberdine Feb 13, 2025
e539896
Manage timeout on SkipServiceBroker
skiplabsdaniel Feb 12, 2025
b8f8754
Manage timeout on SkipServiceBroker (#751)
skiplabsdaniel Feb 13, 2025
d2f3ffd
Use directly node-gyp in build step instead of using full install
skiplabsdaniel Feb 12, 2025
8a5f76c
Force SKIP_new_Obstack to be defined
skiplabsdaniel Feb 12, 2025
dccd5db
Improve addon build step (#754)
skiplabsdaniel Feb 13, 2025
5bd3e34
revert unintentional docs_site revert
jberdine Feb 13, 2025
99f143e
Manage timeouts in departures example
skiplabsdaniel Feb 12, 2025
b29300b
Manage timeouts in departures example (#758)
skiplabsdaniel Feb 13, 2025
e3eec03
Manage cleanly subscription to subscribed resource instance error
skiplabsdaniel Feb 14, 2025
9e3217d
Manage cleanly subscription to subscribed resource instance error (#759)
skiplabsdaniel Feb 14, 2025
4a7d4d5
Move util Reducers from core to helpers
jberdine Jan 10, 2025
7b873e4
Fix exports for @skipruntime/helpers package
bennostein Feb 14, 2025
7bf2b21
Move util Reducers from core to helpers (#748)
bennostein Feb 14, 2025
b01c97a
[skdb/diff_test] Manage identifier to know who's who
skiplabsdaniel Feb 16, 2025
e84fa84
[skdb/test] Use diretly built skdb
skiplabsdaniel Feb 16, 2025
68a1916
[skdb] Fix circleci test_diff (#757)
skiplabsdaniel Feb 17, 2025
db16507
[skipruntime] Allow service instance shutdown to be asynchronous
skiplabsdaniel Feb 10, 2025
6c56404
Add handler to tear down postgres triggers/functions
bennostein Feb 18, 2025
f0d6f72
Mark SkipServer#close as async; drop lint-ignore directive
bennostein Feb 18, 2025
0120ae5
Appease eslint wrt asynchronous signal handlers
bennostein Feb 18, 2025
6f9fe96
Async shutdowns & postgres teardown signal handlers (#761)
bennostein Feb 19, 2025
d6c1f26
Move smart constructors at the top
mbouaziz Feb 18, 2025
f591817
Invariant on CJFields
mbouaziz Feb 18, 2025
7f96ccc
Fix convertNum for objects
mbouaziz Feb 19, 2025
a1b139d
Rewrite convertNum for objects
mbouaziz Feb 19, 2025
0d9220d
Move mapAcc to CJFields
mbouaziz Feb 19, 2025
9fd1466
Use CJFields smart constructor in test
mbouaziz Feb 19, 2025
ec73fa2
Make CJFields constructor private
mbouaziz Feb 19, 2025
c038053
Define order on SKJSON values
mbouaziz Feb 19, 2025
e711209
Test order on SKJSON
mbouaziz Feb 19, 2025
91e85fa
Something is wrong with these too precise floating point numbers
mbouaziz Feb 19, 2025
891b201
Reorder stuff so that it follows the order
mbouaziz Feb 19, 2025
e1bbaa9
Document ordering on Json values
mbouaziz Feb 19, 2025
4f45f5c
Specify order on Json values (#762)
mbouaziz Feb 20, 2025
a3a29cc
import Nullable from core since it is documented there
jberdine Feb 20, 2025
140f54b
hide sknative properties in docs
jberdine Feb 20, 2025
e6f65c1
hide `implements NativeStub`
jberdine Feb 20, 2025
f6752f5
Improve native Reducer docs (#763)
jberdine Feb 20, 2025
45a1fc4
Add expectCmp
mbouaziz Feb 20, 2025
dad9a0c
Fix arparser tests
mbouaziz Feb 20, 2025
1b31a78
Fix semver tests
mbouaziz Feb 20, 2025
69f61d1
Fix skdate tests
mbouaziz Feb 20, 2025
280e428
Generalize skjson CI job
mbouaziz Feb 20, 2025
99d2efa
Test all skiplang libs
mbouaziz Feb 20, 2025
85fe2f3
Fix arparser, semver, skdate tests and add them to the CI (#764)
mbouaziz Feb 21, 2025
3e14f02
Print messages for todo runtime errors
mbouaziz Feb 25, 2025
f853865
Print messages for todo runtime errors (#768)
mbouaziz Feb 25, 2025
ab2e63e
Use max
mbouaziz Feb 24, 2025
76546a5
Use map
mbouaziz Feb 24, 2025
a361cc3
Remove dead unsafeGetFileIterWithReducer
mbouaziz Feb 24, 2025
b02b577
GetFixedFiles is only called with no reducer
mbouaziz Feb 24, 2025
56f574b
Optimize getFixedFilesNoReducer
mbouaziz Feb 24, 2025
a74b415
Name the iterator more explicitly
mbouaziz Feb 24, 2025
31af3bb
FixedDataMapIterator fields should be private
mbouaziz Feb 24, 2025
b66d54b
Use stuff we compute
mbouaziz Feb 24, 2025
a64183e
Simplify EagerDir#getIterRaw
mbouaziz Feb 24, 2025
7f272b6
EagerDir cleanups (#767)
mbouaziz Feb 25, 2025
83678da
Get rid of IterHolder
mbouaziz Feb 24, 2025
0ae8d3e
Replace itemsAfterKey with keysAfter
mbouaziz Feb 25, 2025
ec94fce
Get rid IterHolder (#770)
mbouaziz Feb 25, 2025
74d0dfc
Fix multiple iteration over NonEmptyIterator
mbouaziz Feb 25, 2025
8fbc59b
Fix multiple iterations over NonEmptyIterator... (#773)
mbouaziz Feb 26, 2025
dd61043
StringBytes are not mutable
mbouaziz Feb 21, 2025
e92aff6
ArrayBytes are only readonly
mbouaziz Feb 25, 2025
6861260
IndexedSequenceIterator stride is always 1
mbouaziz Feb 21, 2025
b8a3362
sizeHint may throw ContainerChanged too
mbouaziz Feb 21, 2025
1de1eb0
Remove useless collect
mbouaziz Feb 21, 2025
bf5469f
FileIterator#isEmpty is not used
mbouaziz Feb 21, 2025
b49bfa0
Rename EmptyIterator into EmptyFileIterator
mbouaziz Feb 25, 2025
3d06c00
DeletedDir iterator
mbouaziz Feb 22, 2025
cc4ba73
Use SortedSet constructor directly
mbouaziz Feb 21, 2025
dcc3f8d
Use Iterator#filterNone
mbouaziz Feb 21, 2025
b31f9e5
Use Array#map rather than iterating
mbouaziz Feb 21, 2025
03e345a
Avoid map
mbouaziz Feb 21, 2025
530330e
Less vectors
mbouaziz Feb 21, 2025
3e050e4
Various Iterator cleanups (#766)
mbouaziz Feb 26, 2025
f11e52a
Use uint32_t rather than u_int32_t
mbouaziz Feb 26, 2025
0541b1d
Remove unnecessary includes
mbouaziz Feb 26, 2025
ee760e3
Use stdint.h
mbouaziz Feb 26, 2025
76ca17b
Use time.h
mbouaziz Feb 26, 2025
6655b51
No C++ left here
mbouaziz Feb 26, 2025
13c7323
Ensure null terminator
mbouaziz Feb 26, 2025
9b91f44
Use Time.time_ms
mbouaziz Feb 26, 2025
2582c46
No need for the current_time_millis.sk burden anymore
mbouaziz Feb 26, 2025
6a18215
Move C recommended flags from prelude to cc
mbouaziz Feb 26, 2025
a47ddd2
Build skdate with cc rather than skbuild
mbouaziz Feb 26, 2025
43acc5a
Skdate cleanup (#774)
mbouaziz Feb 26, 2025
a2e5fc1
SKDB does not depend on skbuild
mbouaziz Feb 26, 2025
10a00f0
Remove skbuild
mbouaziz Feb 26, 2025
95c77b1
Skbuild is dead (#775)
mbouaziz Feb 26, 2025
22ab01b
[skdb] Clean wasm test chain
skiplabsdaniel Feb 15, 2025
c23afa4
[skdb] Clean wasm test chain (#760)
skiplabsdaniel Feb 26, 2025
e835994
Changing the order in which we update sub-directories.
pikatchu Feb 12, 2025
23ce5ae
Fixed bug in the comparison function + fixed SQL updates
pikatchu Feb 25, 2025
a21e1d3
Changing the order in which we update sub-directories. (#753)
pikatchu Feb 26, 2025
5448748
Remove superfluous prepare
mbouaziz Feb 27, 2025
7722084
Fix typos
mbouaziz Feb 27, 2025
b648b62
Remove superfluous prepare script (#780)
mbouaziz Feb 27, 2025
9a6df76
Make ProcessBuilder#process_cmd immutable
mbouaziz Feb 26, 2025
584692d
Remove ProcessBuilder#clone
mbouaziz Feb 26, 2025
ca499bc
Constructor for ProcessBuilder
mbouaziz Feb 26, 2025
de3155f
Make ProcessBuilder default constructor and fields private
mbouaziz Feb 26, 2025
858a824
Allow passing extra args to skc
mbouaziz Feb 26, 2025
072160a
Use named args for build_config
mbouaziz Feb 28, 2025
3309374
Move skc_extra_options from CompileOptions to BuildConfig
mbouaziz Feb 28, 2025
0f9ff84
Allow passing extra args to skc from skargo (#782)
mbouaziz Feb 28, 2025
8ef6b26
Check TG_OP to determine trigger type in postgres
bennostein Feb 28, 2025
1a835b4
Check TG_OP to determine trigger type in postgres (#783)
bennostein Feb 28, 2025
93c5efb
Bump NPM versions (excluding ./examples) from 0.0.10 to 0.0.11
bennostein Feb 28, 2025
8a484b3
Update examples/hackernews with new package versions
bennostein Feb 28, 2025
5efee93
Bump NPM versions from 0.0.10 to 0.0.11 (#785)
bennostein Feb 28, 2025
761c70e
[skip/server] Add option to disable CORS.
beauby Feb 27, 2025
2863474
Fix up export paths for @skipruntime/server
bennostein Feb 28, 2025
b79bb0c
[skip/server] Add option to disable CORS. (#779)
bennostein Feb 28, 2025
059d3d1
Bump NPM versions (excluding ./examples) from 0.0.11 to 0.0.12
bennostein Feb 28, 2025
dc4707e
Update package-lock.json for new server mocha tests
bennostein Feb 28, 2025
0626b14
Update examples/hackernews with new package versions
bennostein Feb 28, 2025
7aabc48
NPM versions 0.0.11 -> 0.0.12 (#786)
bennostein Feb 28, 2025
d3756e9
[examples/hackernews] Clean up SQL calls.
beauby Feb 26, 2025
f935311
[examples/hackernews] Add login.
beauby Feb 17, 2025
8619f02
[examples/hackernews] Improve layout.
beauby Feb 19, 2025
b763a80
[examples/hackernews] Add relative time.
beauby Feb 24, 2025
81a61e0
[examples/hackernews] Better fixtures.
beauby Feb 25, 2025
6e7f0ad
[examples/hackernews] Add button to simulate activity.
beauby Feb 26, 2025
0f15986
[examples/hackernews] Various improvements. (#776)
beauby Mar 2, 2025
0d5e741
Bump docs site
jberdine Mar 3, 2025
97730f3
instantiateUserObject
mbouaziz Oct 3, 2024
f1226fe
Remove unnecessary as
mbouaziz Mar 4, 2025
0643f8e
Remove unnecessary type annotation
mbouaziz Mar 5, 2025
9ee8152
Remove unused is
mbouaziz Mar 5, 2025
0b139b8
Remove deprecated comment
mbouaziz Mar 5, 2025
8e68d5c
Remove unused castBool
mbouaziz Mar 5, 2025
9dce0cb
EagerCollectionImpl.getName
mbouaziz Mar 5, 2025
a5536be
Minor cleanups in Skipruntime-ts (#789)
mbouaziz Mar 5, 2025
668013e
Validate more Postgres numeric type aliases
bennostein Mar 6, 2025
f24d6c4
Extract some utils from main Postgres adapter file
bennostein Mar 6, 2025
28cbb7d
Refactor postgres numeric type validation
bennostein Mar 6, 2025
2916f13
Validate more Postgres numeric type aliases; extract to a utils file …
bennostein Mar 6, 2025
3b7c87b
ValuesImpl#toArray as a method rather than a field
mbouaziz Feb 25, 2025
38c4334
ValuesImpl#next is private
mbouaziz Feb 25, 2025
fbf594a
Cache NonEmptyIterator values in JS
mbouaziz Feb 25, 2025
4758497
We don't need first, uniqueValue, and clone anymore
mbouaziz Feb 25, 2025
0cbcf11
NonEmptyIterator#clone is not used anymore
mbouaziz Feb 25, 2025
acf68e4
Make NonEmptyIterator mutable fields private
mbouaziz Feb 24, 2025
5651719
NonEmptyIterator#getUnique
mbouaziz Feb 21, 2025
80bdeb3
Make assertUnique return the value
mbouaziz Feb 22, 2025
21b8a64
Restrict MapFunRow to NonEmptyIterator
mbouaziz Feb 24, 2025
c61ff98
Use NonEmptyIterator#first
mbouaziz Feb 24, 2025
01f2937
NonEmptyIterator#toArray
mbouaziz Feb 24, 2025
2dad6e2
Make NonEmptyIterator not extend Iterator
mbouaziz Feb 24, 2025
e3745be
EmptyIterator#next is useless
mbouaziz Feb 24, 2025
24eb388
Use NonEmptyIterator#first rather than next()
mbouaziz Feb 24, 2025
ac2374e
NonEmptyIterator#nonEmptyReduce rather than using next
mbouaziz Feb 24, 2025
4a99c26
Make next private
mbouaziz Feb 25, 2025
ff39b5c
Use nonEmptyMap rather than map
mbouaziz Feb 25, 2025
638e209
Get rid of materialized
mbouaziz Feb 25, 2025
eeb57b5
getUnique does iterate
mbouaziz Feb 25, 2025
b158678
Make sure people do not misuse NonEmptyIterator
mbouaziz Feb 25, 2025
faf1fc0
Simplify nonEmptyReduce
mbouaziz Feb 25, 2025
e455139
iter is not mutable anymore
mbouaziz Feb 25, 2025
ddb9638
Backward-compatibility
mbouaziz Feb 28, 2025
8fbb4f4
Update bootstrap
mbouaziz Feb 28, 2025
ccb74ea
Rework ValuesImpl and NonEmptyIterator (#771)
mbouaziz Mar 7, 2025
d8bbbef
Add hacking section on building against local packages
jberdine Mar 7, 2025
7795f44
Add hacking section on building against local packages (#794)
jberdine Mar 10, 2025
6705780
Use unique resource instance IDs instead of generating PG client IDs
bennostein Mar 6, 2025
237af0f
Add PG update during unit test
bennostein Mar 6, 2025
036ccce
Add second table and delete during postgres unit test
bennostein Mar 6, 2025
d0bfd09
Handle non-unique keys in initial postgres payload
bennostein Mar 6, 2025
4a9be2c
Tweak postgres unit test to include a table with non-unique key
bennostein Mar 6, 2025
38628af
Use resource instance IDs instead of generating postgres client IDs (…
bennostein Mar 10, 2025
29f0264
[skip-adapter/postgres] Support non-unique key columns (#793)
bennostein Mar 10, 2025
327c346
Catch package-lock.json up to latest versions
bennostein Mar 12, 2025
82ef5bc
Catch package-lock.json up to latest versions (#798)
bennostein Mar 12, 2025
5253862
[skip/helpers] Add `join_one()`/`join_many()` helpers.
beauby Mar 2, 2025
bb33918
wip
beauby Mar 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
150 changes: 150 additions & 0 deletions .circleci/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
version: 2.1

commands:
setup:
description: "Setup skip toolchain"
steps:
- run:
name: Fetch submodules
command: |
git submodule update --init --recursive

jobs:
fast-checks:
docker:
- image: skiplabs/skip:latest
steps:
- checkout
- run:
name: Check code is formatted
command: |
make check-fmt
- run:
name: Check shell scripts
command: |
make check-sh

check-ts:
docker:
- image: skiplabs/skip:latest
steps:
- checkout
- setup
- run:
name: Typecheck and lint typescript sources
command: SKIPRUNTIME=$(pwd)/build/skipruntime npm install && npm run build && npm run lint

compiler:
docker:
- image: skiplabs/skiplang:latest
resource_class: xlarge
steps:
- checkout
- setup
- run:
name: Run compiler tests
no_output_timeout: 30m
command: |
mkdir -p ~/test-results
cd skiplang/compiler && make STAGE=1
PATH=$(realpath ./stage1/bin):$PATH skargo test --jobs 8 --junitxml ~/test-results/skc.xml
- store_test_results:
path: ~/test-results/skc.xml

skstore:
docker:
- image: skiplabs/skiplang:latest
steps:
- checkout
- setup
- run:
name: Run skstore tests
command: |
mkdir -p ~/test-results
cd skiplang/prelude && skargo test --jobs 8 --junitxml ~/test-results/skstore.xml
- store_test_results:
path: ~/test-results/skstore.xml

skdb:
docker:
- image: skiplabs/skdb-base:latest
steps:
- checkout
- setup
- run:
name: Run native skdb tests
command: |
make test-native

skdb-wasm:
docker:
- image: skiplabs/skdb-base:latest
steps:
- checkout
- setup
- run:
name: Run wasm skdb tests
no_output_timeout: 15m
command: |
mkdir -p ~/test-results
make test-wasm
- store_test_results:
path: ~/test-results/skdb-wasm.xml

skiplang-lib-tests:
docker:
- image: skiplabs/skiplang:latest
parameters:
libname:
type: string
steps:
- checkout
- setup
- run:
name: Run << parameters.libname >> tests
command: |
mkdir -p ~/test-results
cd skiplang/<< parameters.libname >> && skargo test --junitxml ~/test-results/<< parameters.libname >>.xml
- store_test_results:
path: ~/test-results

skipruntime:
docker:
- image: skiplabs/skip:latest
- image: cimg/postgres:17.0
environment:
PGHOST: localhost
PGDATABASE: postgres
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: secret
steps:
- checkout
- setup
- run:
name: Run wasm skip runtime tests
no_output_timeout: 10m
command: |
mkdir -p ~/test-results
make test-skipruntime-ts
- store_test_results:
path: ~/test-results/skipruntime.xml

check-hackernews-example:
docker:
- image: cimg/base:2025.01
steps:
- checkout
- setup
- setup_remote_docker
- run:
name: Build docker images
working_directory: ~/project/examples/hackernews
command: docker compose build
- run:
name: Start services
working_directory: ~/project/examples/hackernews
command: docker compose up --wait
- run:
name: Test back end health
command: (docker run --network hackernews_default -it cimg/base:2025.01 curl --silent --max-time 0.1 --insecure --location https://haproxy/api/posts || true) | grep --quiet "data:"
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2.1

setup: true

orbs:
continuation: circleci/[email protected]

jobs:
setup:
executor: continuation/default
steps:
- checkout
- run:
name: Generate config
command: |
.circleci/generate_config.sh > generated_config.yml
- continuation/continue:
configuration_path: generated_config.yml

workflows:
setup:
jobs:
- setup
115 changes: 115 additions & 0 deletions .circleci/generate_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash

# TODO: This is flaky as it relies on coarse directory-level diffs.

BASE="$(git merge-base main HEAD)"

# shellcheck disable=SC2046 # We actually want splitting in jq command output
git diff --quiet HEAD "$BASE" -- $(jq --raw-output ".workspaces[]" package.json)
check_ts=$?
git diff --quiet HEAD "$BASE" -- skiplang/compiler/ skiplang/prelude/ :^skiplang/prelude/ts
skc=$?
git diff --quiet HEAD "$BASE" -- skiplang/prelude/src/skstore/ skiplang/prelude/runtime/
skstore=$?
git diff --quiet HEAD "$BASE" -- skiplang/skjson
skjson=$?
git diff --quiet HEAD "$BASE" -- sql/ skiplang/sqlparser/
skdb=$?
git diff --quiet HEAD "$BASE" -- skipruntime-ts/
skipruntime=$?
git diff --quiet HEAD "$BASE" -- skiplang/prelude/ts/
ts_prelude=$?
git diff --quiet HEAD "$BASE" -- examples/hackernews/
hackernews_example=$?

SKIPLANG_LIBS_CHANGED=()
for lib_tests in skiplang/*/tests; do
lib=$(basename "$(dirname "$lib_tests")")
if [ "$lib" != compiler ] && [ "$lib" != prelude ] && \
! git diff --quiet HEAD "$BASE" -- "skiplang/$lib"; then
SKIPLANG_LIBS_CHANGED+=("$lib")
fi
done

cat .circleci/base.yml

echo "workflows:"

cat <<EOF
fast-checks:
jobs:
- fast-checks
EOF

if (( check_ts != 0 ))
then
cat <<EOF
check-ts:
jobs:
- check-ts
EOF
fi

if (( skc != 0 ))
then
cat <<EOF
compiler:
jobs:
- compiler
EOF
fi

if (( skstore != 0 ))
then
cat <<EOF
skstore:
jobs:
- skstore
EOF
fi

if [ ${#SKIPLANG_LIBS_CHANGED[@]} -gt 0 ]; then
echo " skiplang-libs-tests:"
echo " jobs:"
for lib in "${SKIPLANG_LIBS_CHANGED[@]}"; do
echo " - skiplang-lib-tests:"
echo " libname: $lib"
echo " name: $lib"
done
fi

if (( skdb != 0 || skstore != 0 ))
then
cat <<EOF
skdb:
jobs:
- skdb
EOF
fi

if (( skdb != 0 || skstore != 0 || ts_prelude != 0 || skjson != 0 ))
then
cat <<EOF
skdb-wasm:
jobs:
- skdb-wasm
EOF
fi

if (( skstore != 0 || skipruntime != 0 || ts_prelude != 0 || skjson != 0 ))
then
cat <<EOF
skipruntime:
jobs:
- skipruntime
EOF
fi

if (( hackernews_example != 0))
then
cat <<EOF
hackernews-example:
jobs:
- check-hackernews-example
EOF
fi
Loading