ci: Add fmt-check/linting workflow (#461)

* ci: Add fmt-check/linting workflow

* fix branch name
This commit is contained in:
Fabian-Lars
2023-05-10 15:13:21 +02:00
committed by GitHub
parent 25de1c9674
commit 38b5eafa53
2 changed files with 44 additions and 1 deletions

42
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- dev
- 'renovate/**'
- '!renovate/lock-file-maintenance'
jobs:
CI:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.x.x
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: install dependencies
run: pnpm install
- name: check formatting
run: pnpm format
- name: run linter
run: pnpm lint
#- name: run tests
# run: pnpm test

View File

@@ -9,7 +9,8 @@
"scripts": {
"build": "ncc build src/index.ts -o dist -m",
"lint": "eslint src/**",
"format": "prettier -w src/** action.yml README.md"
"format": "prettier --write src/** action.yml README.md",
"format:check": "prettier --check src/** action.yml README.md"
},
"repository": {
"type": "git",