Add lint and build gitea workflow
This commit is contained in:
parent
4e73b98a17
commit
02235b12a9
42
.gitea/workflows/lint-and-build.yml
Normal file
42
.gitea/workflows/lint-and-build.yml
Normal file
@ -0,0 +1,42 @@
|
||||
name: Lint and Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'src/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'src/**'
|
||||
|
||||
jobs:
|
||||
lint-and-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Enable corepack and yarn
|
||||
run: corepack enable
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Run lint
|
||||
run: yarn lint
|
||||
|
||||
- name: Run build
|
||||
run: yarn build
|
||||
Loading…
Reference in New Issue
Block a user