From b91f3096c001393c0f403d6afea7da67b6dc41a3 Mon Sep 17 00:00:00 2001 From: Sam Mohr Date: Sat, 21 Dec 2024 16:11:07 -0800 Subject: [PATCH] Add CI test for docs gen (#8) --- .github/workflows/tests.yaml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 27c516d..008630e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,9 +8,9 @@ concurrency: cancel-in-progress: true jobs: - - test-examples: + run-tests: runs-on: [ubuntu-20.04] + name: Run Roc tests steps: - uses: actions/checkout@v3 @@ -32,5 +32,30 @@ jobs: - run: ./roc_nightly/roc version - # run all tests - run: ./roc_nightly/roc test package/main.roc + + test-docs: + runs-on: [ubuntu-20.04] + name: Validate docs generation + steps: + - uses: actions/checkout@v3 + + # get roc cli + - name: get latest roc nightly + run: | + curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz + + - name: rename nightly tar + run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz + + - name: decompress the tar + run: tar -xzf roc_nightly.tar.gz + + - run: rm roc_nightly.tar.gz + + - name: simplify nightly folder name + run: mv roc_nightly* roc_nightly + + - run: ./roc_nightly/roc version + + - run: ./roc_nightly/roc docs package/main.roc