Skip to content

Commit 27e09b3

Browse files
committed
Add workflows/ci.yml
1 parent 6979f91 commit 27e09b3

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.repository == 'codewars/ocaml' }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: docker/setup-buildx-action@v2
15+
16+
- name: Build image
17+
uses: docker/build-push-action@v3
18+
with:
19+
context: .
20+
push: false
21+
# Make the image available in next step
22+
load: true
23+
tags: ghcr.io/codewars/ocaml:latest
24+
cache-from: type=gha
25+
cache-to: type=gha,mode=max
26+
27+
- name: Run Batteries Example
28+
run: bin/run examples/batteries
29+
30+
- name: Run Base Example (with failing tests)
31+
run: bin/run examples/base
32+
33+
- name: Run Domainslib Example
34+
run: bin/run examples/domainslib
35+
36+
- name: Run Zartih Example
37+
run: bin/run examples/zarith
38+
39+
- name: Report Image Size
40+
run: |
41+
echo "## Image Size" >> $GITHUB_STEP_SUMMARY
42+
docker image inspect --format '{{.Size}}' ghcr.io/codewars/ocaml:latest | numfmt --to=si --suffix=B >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)