From 354e10de0b459883856f754beaade3e3bb77bc66 Mon Sep 17 00:00:00 2001 From: Tim 'Piepmatz' Hesse Date: Mon, 2 Dec 2024 22:47:07 +0100 Subject: [PATCH] add cicd for deno --- .github/workflows/cicd.yml | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..d280151 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,91 @@ +name: Deno CI + +on: + push: + pull_request: + +jobs: + setup: + name: Setup Deno + runs-on: ubuntu-latest + outputs: + deno-cache: ${{ steps.cache.outputs.cache-hit }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Cache Deno modules + id: cache + uses: actions/cache@v3 + with: + path: ~/.cache/deno + key: ${{ runner.os }}-deno-cache + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + check: + name: Deno Check + runs-on: ubuntu-latest + needs: setup + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Deno Check + run: deno check . + + lint: + name: Deno Lint + runs-on: ubuntu-latest + needs: setup + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Deno Lint + run: deno lint + + format: + name: Deno Format Check + runs-on: ubuntu-latest + needs: setup + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Deno Format Check + run: deno fmt --check + + test: + name: Deno Test + runs-on: ubuntu-latest + needs: setup + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Deno Test + run: deno test --allow-all