From 13897bf625b1826211aae3137b83d090919319b4 Mon Sep 17 00:00:00 2001 From: ge Date: Tue, 22 Apr 2025 19:56:58 +0300 Subject: [PATCH] ci: add tests CI --- .github/workflows/{main.yml => docs.yaml} | 4 +--- .github/workflows/test.yaml | 24 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) rename .github/workflows/{main.yml => docs.yaml} (95%) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/docs.yaml similarity index 95% rename from .github/workflows/main.yml rename to .github/workflows/docs.yaml index c19b0a9..52f2ae7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/docs.yaml @@ -1,9 +1,7 @@ -name: CI +name: Docs on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] workflow_dispatch: jobs: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..f9d8c51 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,24 @@ +name: Tests +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup V + run: | + wget -qO /tmp/v.zip https://github.com/vlang/v/releases/latest/download/v_linux.zip + unzip -q /tmp/v.zip -d /tmp + echo /tmp/v >> "$GITHUB_PATH" + + - name: Run tests + run: | + v -stats test .