add workflows for testing and linting

This commit is contained in:
zS1L3NT Mac 2024-07-10 11:23:37 +08:00
parent 435d0e941b
commit ab73d68c28
No known key found for this signature in database
GPG Key ID: 02BE07CD431E4F42
3 changed files with 37 additions and 0 deletions

11
.github/workflows/on-pull-request.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: On Pull Request
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
lint:
uses: ./.github/workflows/run-linter.yml
test:
uses: ./.github/workflows/run-tests.yml

13
.github/workflows/run-linter.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Run Linter
on:
workflow_dispatch:
workflow_call:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun lint

13
.github/workflows/run-tests.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Run Tests
on:
workflow_dispatch:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun test