Skip to content

Commit

Permalink
ci: use reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 17, 2024
1 parent f077ca2 commit b7d8864
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 47 deletions.
48 changes: 16 additions & 32 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Integration
name: CI

on:
push:
Expand All @@ -7,36 +7,20 @@ on:
pull_request:

jobs:
Linting:
formatting:
name: Formatting
uses: sapphiredev/.github/.github/workflows/reusable-prettier.yml@main

linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Use Node.js v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: ESLint
run: yarn lint
uses: sapphiredev/.github/.github/workflows/reusable-lint.yml@main

typecheck:
name: Typecheck
uses: sapphiredev/.github/.github/workflows/reusable-typecheck.yml@main

Typechecking:
name: Typechecking
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Use Node.js v20
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Typechecking
run: yarn test
sonar:
name: Sonar Analysis
uses: sapphiredev/.github/.github/workflows/reusable-sonar.yml@main
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
15 changes: 1 addition & 14 deletions .github/workflows/labelsync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,4 @@ on:

jobs:
label_sync:
name: Automatic Label Synchronization
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
sparse-checkout: .github/labels.yml
sparse-checkout-cone-mode: false
repository: 'sapphiredev/.github'
- name: Run Label Sync
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
uses: sapphiredev/.github/.github/workflows/reusable-labelsync.yml@main
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"test": "nuxt typecheck",
"typecheck": "nuxt typecheck",
"lint": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."
Expand Down

0 comments on commit b7d8864

Please sign in to comment.