From 833fc35adf91e52e351be0afa1ad679e707b83a4 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Sun, 15 Jun 2025 05:30:11 -0500 Subject: [PATCH] Add Gitea Actions workflow to run unit tests before allowing merge to main. --- .gitea/workflows/pr-validation.yaml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/pr-validation.yaml diff --git a/.gitea/workflows/pr-validation.yaml b/.gitea/workflows/pr-validation.yaml new file mode 100644 index 0000000..fcd4f93 --- /dev/null +++ b/.gitea/workflows/pr-validation.yaml @@ -0,0 +1,34 @@ +--- +name: PR Validation + +on: + pull_request: + branches: + - main + +jobs: + unittest: + name: Unit Tests + runs-on: [pbm_api_cicd] + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Cache dependecies + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 + with: + path: | + ~/.nimble + key: ${{ runner.os }}-nimble-${{ hashFiles('update_version.nimble') }} + restore-keys: | + ${{ runner.os }}-nimble- + + - name: Build unittests + run: | + printf "🔨\033[0;32m Compiling unit tests...\033[0m\n" >&1 + nimble build + + - name: Run unittests + run: | + printf "🧪\033[0;32m Running unit tests...\033[0m\n" >&1 + ./update_version test -- 2.52.0