ci: run typechecks, build and tests on PR
This commit is contained in:
parent
620d1bf4fd
commit
9e1dfcc669
2 changed files with 28 additions and 10 deletions
15
.github/actions/install-dependencies/action.yml
vendored
Normal file
15
.github/actions/install-dependencies/action.yml
vendored
Normal file
|
|
@ -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
|
||||
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue