From 9e1dfcc669519083719a6a8179450b428c4d8d64 Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Fri, 19 Dec 2025 18:55:17 +0100 Subject: [PATCH] ci: run typechecks, build and tests on PR --- .../actions/install-dependencies/action.yml | 15 ++++++++++++ .github/workflows/ci.yml | 23 +++++++++++-------- 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/actions/install-dependencies/action.yml diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml new file mode 100644 index 00000000..36b4abec --- /dev/null +++ b/.github/actions/install-dependencies/action.yml @@ -0,0 +1,15 @@ +name: Install dependencies + +description: Install dependencies + +runs: + using: "composite" + steps: + - uses: oven-sh/setup-bun@v2 + name: Install Bun + with: + bun-version: "1.3.5" + + - name: Install dependencies + shell: bash + run: bun install --frozen-lockfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acb4c335..ad288622 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,18 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 - ref: ${{ github.ref }} - - name: Scan current project - id: scan - uses: anchore/scan-action@v7 - with: - path: "." + - name: Install dependencies + uses: "./.github/actions/install-dependencies" - - name: upload Anchore scan SARIF report - uses: github/codeql-action/upload-sarif@v4 - with: - sarif_file: ${{ steps.scan.outputs.sarif }} + - name: Run type checks + shell: bash + run: bun run tsc + + - name: Run tests + shell: bash + run: bun run test --ci --coverage + + - name: Build project + shell: bash + run: bun run build