Skip to content

style: fix code-style problems #223

style: fix code-style problems

style: fix code-style problems #223

name: Quality assurance
on:
- push
- workflow_dispatch
env:
GO_VERSION: '1.21.4'
PNPM_VERSION: '8.13.1'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: app/go.sum
- uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: Install C/C++ deps
run: sudo apt install libudev-dev -y
- name: Install frontend deps
run: |
cd app/frontend
pnpm install --frozen-lockfile
cd ../..
- name: Create dummy dist dir
run: |
mkdir -p app/frontend/dist
echo "." > app/frontend/dist/.gitkeep
- name: Sync workspace
run: go work sync
- name: golangci-lint lib
uses: golangci/golangci-lint-action@v3
with:
args: --config=../.golangci.yaml
working-directory: ./lib
skip-cache: true
- name: revive lib
uses: docker://morphy/revive-action:v2
with:
config: revive.toml
path: "./lib/..."
- name: golangci-lint app
uses: golangci/golangci-lint-action@v3
with:
args: --config=../.golangci.yaml
working-directory: ./app
skip-cache: true
- name: revive app
uses: docker://morphy/revive-action:v2
with:
config: revive.toml
path: "./app/..."
- name: Lint frontend scripts
run: |
cd app/frontend
pnpm run lint:scripts
- name: Lint frontend styles
run: |
cd app/frontend
pnpm run lint:styles