diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..be253c4 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + pull_request: +jobs: + test_and_lint: + name: Test and lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.1.x + - run: "deno task test" + - run: "deno lint" diff --git a/deno.json b/deno.json index 3b686e8..8583215 100644 --- a/deno.json +++ b/deno.json @@ -2,7 +2,8 @@ "tasks": { "dev": "deno run --allow-all --watch server.ts", "server": "deno run --allow-all server.ts", - "compile": "deno compile --allow-all --include ./assets/ --output substr server.ts" + "compile": "deno compile --allow-all --include ./assets/ --output substr server.ts", + "test": "deno test --allow-read --allow-env" }, "imports": { "@deno/gfm": "jsr:@deno/gfm@^0.10.0",