From 4fe862fdfd47534f8f818b51cee347c9ec0d4ccf Mon Sep 17 00:00:00 2001 From: gmega Date: Wed, 18 Jun 2025 20:21:50 -0300 Subject: [PATCH] feat: add basic CI --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..71806ac --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8ddc1e7 --- /dev/null +++ b/Dockerfile @@ -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 + + + +