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
This commit is contained in:
2025-05-28 18:14:26 +02:00
parent 07730e5761
commit 9ad407e531

46
.gitea/workflows/ci.yml Normal file
View File

@@ -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