feat: add basic CI

This commit is contained in:
gmega 2025-06-18 20:21:50 -03:00
parent c43e63db0b
commit 4fe862fdfd
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
2 changed files with 52 additions and 0 deletions

32
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Lint and Test the Codex Local Harness
on:
push:
branches:
- master
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Test Image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: false
load: true
tags: clh:test
- name: Run Tests
run: docker run -it --rm clh:test ./test/bats/bin/bats test/

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# FIXME: the Codex we're using is NOT the same as the one in the
# submodule. Ideally we'd first build the Codex image from
# that Dockerfile, and then use THAT in here.
FROM codexstorage/nim-codex:latest AS codex
FROM ubuntu:22.04
COPY --from=codex /usr/local/bin/codex /usr/local/bin/codex
ENV CODEX_BINARY=/usr/local/bin/codex
RUN apt-get update && apt-get install -y shellcheck git curl libgomp1
WORKDIR /codex-local-harness
COPY . .
RUN git submodule update --init --recursive