Skip to content

Commit

Permalink
ci: initial pipeline setup
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantinos Maninakis <[email protected]>
  • Loading branch information
maninak committed Nov 20, 2023
1 parent f3582eb commit 36088d7
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint-build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'pnpm'
- name: Install Dependencies
run: pnpm run verify-deps
- name: Lint Code
run: pnpm run lint
- name: Test Typings
run: pnpm run test:typings
continue-on-error: true # temporarily allowed to fail because script fails due to a 3rd party lib bug
- name: Test Unit
run: pnpm run test:unit
13 changes: 13 additions & 0 deletions .github/workflows/commit-linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Commit Linting
on:
pull_request:
branches: [ main ]

jobs:
lint-commit-messages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
15 changes: 15 additions & 0 deletions .github/workflows/pr-linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: PR Linting
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
with:
configuration-path: ./commitlint.config.cjs
4 changes: 4 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {},
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"dev": "npm run verify-deps && nuxt dev",
"build": "nuxt build",
"preview": "nuxt preview",
"lint": "eslint . --max-warnings 0 --no-warn-ignored --cache --cache-location node_modules/.cache/eslint"
"lint": "eslint . --max-warnings 0 --no-warn-ignored --cache --cache-location node_modules/.cache/eslint",
"test": "npm run test:typings && npm run test:unit",
"test:typings": "nuxi typecheck",
"test:unit": "echo \"Unit testing not yet implemented.\""
},
"dependencies": {
"@iconify/json": "^2.2.142",
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36088d7

Please sign in to comment.