Skip to content

Commit

Permalink
Add quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbroup authored Jul 1, 2024
1 parent d68b80d commit 8991e83
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check formatting

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: npm

- name: Install dependencies
run: npm ci

- name: Verify formatting
run: npm run format:check
34 changes: 34 additions & 0 deletions .github/workflows/check_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check linting

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: npm

- name: Install dependencies
run: npm ci

- name: Verify linter
run: npm run lint:check
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run tests

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: npm

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test

0 comments on commit 8991e83

Please sign in to comment.