From 9ad407e531270445d9657402fa3e826a7dabd880 Mon Sep 17 00:00:00 2001 From: "Max P." Date: Wed, 28 May 2025 18:14:26 +0200 Subject: [PATCH] feat(ci): add CI workflow with format, lint, and test steps - Introduces a CI workflow triggered on push, pull requests, and manual dispatch - Includes steps for code formatting, linting, and testing using Deno - Fails the workflow if any of the steps do not succeed --- .gitea/workflows/ci.yml | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..33a1a43 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + - reopened + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: denoland/setup-deno@v1 + with: + deno-version: v2.x + + - name: Format + id: format + continue-on-error: true + run: deno task fmt + + - name: Lint + id: lint + continue-on-error: true + run: deno task lint + + - name: Test + id: test + continue-on-error: true + run: deno task test + + - name: Fail if any step failed + if: | + steps.format.outcome != 'success' || + steps.lint.outcome != 'success' || + steps.test.outcome != 'success' + run: | + echo "::error::One or more steps failed" + exit 1