Skip to content

Commit

Permalink
ci: add autofix and ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes committed Jun 13, 2024
1 parent 84dab73 commit 37c2dd4
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 20.5
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Lint & Fix
run: pnpm run lint:fix

- uses: autofix-ci/action@d3e591514b99d0fca6779455ff8338516663f7cc
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 20.5
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Prepare
run: pnpm run dev:prepare

- name: Lint files
run: pnpm run lint

build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 20.5
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Prepare
run: pnpm run dev:prepare

- name: Generate files
run: pnpm run prepack

test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 20.5
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Prepare
run: pnpm run dev:prepare

- name: Run tests
run: pnpm run test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest run",
"test:watch": "vitest watch",
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
Expand Down

0 comments on commit 37c2dd4

Please sign in to comment.