Skip to content

Commit

Permalink
chore(actions): add build and lint action
Browse files Browse the repository at this point in the history
Satont committed Dec 13, 2023
1 parent b68f59a commit fdf5da1
Showing 3 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apps/dota
39 changes: 39 additions & 0 deletions .github/workflows/build-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and lint

on:
push:

jobs:
build-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Lint
run: pnpm run lint

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"node": ">= 20"
},
"scripts": {
"lint": "eslint --ext .ts,.vue apps/",
"lint": "eslint --ext .ts,.vue apps/ libs/",
"lint:fix": "eslint --fix --ext .ts,.vue,tsx apps/ frontend/",
"predev": "pnpm build:libs",
"dev": "go run ./tools/dev.go",

0 comments on commit fdf5da1

Please sign in to comment.