Skip to content

Commit 65a3205

Browse files
authored
ci: setup earthly (#14)
1 parent 0a7ad00 commit 65a3205

6 files changed

Lines changed: 46 additions & 9 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,37 @@ concurrency:
66
cancel-in-progress: true
77

88
jobs:
9+
earthly:
10+
name: Earthly ci
11+
runs-on: ubuntu-latest
12+
permissions: write-all
13+
steps:
14+
- uses: earthly/actions-setup@v1
15+
with:
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
version: "latest" # or pin to an specific version, e.g. "0.8.1"
18+
- uses: actions/checkout@v4
19+
- name: Docker login # to avoid dockerhub rate-limiting
20+
run: docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_PASSWORD }}"
21+
- name: Login to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Check earthly version
28+
run: earthly --version
29+
- name: Run tests with earthly
30+
run: earthly -P +test --ci --remote-cache=ghcr.io/mping/intemporal:ci-cache
31+
- name: Setup LCOV
32+
uses: hrishikesh-kadam/setup-lcov@v1
33+
- uses: kcjpop/coverage-comments@v2.2
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
coverage-file: './coverage/lcov.info'
37+
938
clojure:
39+
if: false
1040
runs-on: ubuntu-latest
1141
steps:
1242
- name: Checkout

DEVELOPMENT.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,15 @@ clj -A:dev:doc:cljs
3939
bin/kaocha test
4040
bin/kaocha test-cljs
4141

42-
;; or run everything
42+
# or run everything
4343
bin/run-coverage
44+
45+
# focusing
46+
./bin/kaocha test --focus intemporal.shutdown-restart-test
47+
48+
# cljs focus is a bit different
49+
./bin/kaocha test-cljs --focus 'cljs:intemporal.shutdown-restart-test'
50+
4451
```
4552

4653
# CI runs

Earthfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DO github.com/earthly/lib+INSTALL_DIND
66
# FROM earthly/dind:ubuntu-24.04-docker-27.3.1-1
77

88
RUN apt update
9-
RUN apt install -y rlwrap curl unzip wget lcov
9+
RUN apt -qq install -y rlwrap curl unzip wget lcov
1010

1111
### nodejs
1212
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
@@ -27,7 +27,7 @@ deps:
2727
RUN npm install
2828
#RUN wget https://github.com/apple/foundationdb/releases/download/7.3.63/foundationdb-clients_7.3.63-1_aarch64.deb
2929
#RUN dpkg -i foundationdb-clients_7.3.63-1_aarch64.deb
30-
RUN wget https://github.com/apple/foundationdb/releases/download/7.1.31/foundationdb-clients_7.1.31-1_amd64.deb
30+
RUN wget -q https://github.com/apple/foundationdb/releases/download/7.1.31/foundationdb-clients_7.1.31-1_amd64.deb
3131
RUN dpkg -i foundationdb-clients_7.1.31-1_amd64.deb
3232
RUN echo "docker:docker@127.0.0.1:4500" > /etc/foundationdb/fdb.cluster
3333

@@ -64,8 +64,8 @@ test:
6464
FROM +build-base
6565
#DO github.com/earthly/lib+INSTALL_DIND
6666
COPY docker ./docker
67-
COPY docker-compose.yml ./
68-
WITH DOCKER --compose docker-compose.yml
67+
COPY docker-compose.yaml ./
68+
WITH DOCKER --compose docker-compose.yaml
6969
RUN bin/run-coverage
7070
END
7171
SAVE ARTIFACT ./coverage AS LOCAL ./coverage

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Examples:
5656
(foo pr :X))))
5757

5858
(def mstore (store/make-memstore))
59-
(def stop-worker (w/start-worker! mstore {`MyActivities (->MyActivitiesImpl)}))
59+
(def executor (w/start-poller! mstore {`MyActivities (->MyActivitiesImpl)}))
6060

6161
;; note that in cljs, this returns a promise
6262
(def res (w/with-env {:store mstore}

bin/run-coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ printf "${BLUE}running cljs tests...${NC}\n"
1616
CLOVERAGE_OUTPUT=target/coverage-cljs bin/kaocha test-cljs --reporter documentation
1717

1818
printf "${BLUE}combining coverage reports...${NC}\n"
19-
lcov --add-tracefile target/coverage-clj/lcov.info --add-tracefile target/coverage-cljs/lcov.info -o coverage/lcov.merged.info
20-
genhtml coverage/lcov.merged.info -o coverage
19+
lcov --add-tracefile target/coverage-clj/lcov.info --add-tracefile target/coverage-cljs/lcov.info -o coverage/lcov.info
20+
genhtml coverage/lcov.info -o coverage
2121

2222
printf "${BLUE}done! opening report${NC}\n"
2323
xdg-open coverage/index.html || open coverage/index.html || true

docker/fdb.cluster

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker:docker@172.20.0.3:4500
1+
docker:docker@172.22.0.3:4500

0 commit comments

Comments
 (0)