From c64c47f27598a0346c50ab91ad6433c311bb25b0 Mon Sep 17 00:00:00 2001 From: remimimimimi Date: Mon, 21 Sep 2026 20:34:21 +0300 Subject: [PATCH] Add github action --- .github/workflows/tests.yml | 18 ++++++++++++++++++ ci/Dockerfile | 15 +++++++++++++++ ci/tests.aplf | 11 +++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .github/workflows/tests.yml create mode 100644 ci/Dockerfile create mode 100644 ci/tests.aplf diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ddf9f9b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,18 @@ +name: Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + basic: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - name: Build test image + run: docker build -f ci/Dockerfile -t cold-tests . + - name: Run basic tests + run: docker run --rm cold-tests diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 0000000..286b2a1 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,15 @@ +# Based on https://github.com/stampes/CISimple +FROM docker.io/dyalog/dyalog + +USER root +RUN apt-get update && apt-get install -y --no-install-recommends binutils \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /cold +COPY --chown=dyalog:dyalog ws/ ws/ +COPY --chown=dyalog:dyalog lnk/ lnk/ +COPY --chown=dyalog:dyalog tests/ tests/ +COPY --chown=dyalog:dyalog ci/tests.aplf ci/tests.aplf + +ENV LOAD=/cold/ci/tests.aplf +USER dyalog diff --git a/ci/tests.aplf b/ci/tests.aplf new file mode 100644 index 0000000..9ea478c --- /dev/null +++ b/ci/tests.aplf @@ -0,0 +1,11 @@ +tests;root +:Trap 0 + root←⊃1 ⎕NPARTS'' + _←⎕SE.Link.Import # (root,'ws') + #.UT.PROJECT_ROOT←root + _←#.UT.Run'B -serial' +:Else + ⎕←⎕DMX.DM + ⎕OFF 1 +:EndTrap +⎕OFF 0