Skip to content

Commit

Permalink
ci: simplify and standardize pipelines
Browse files Browse the repository at this point in the history
1. Upgrade node version in release.yml
2. Merge 'ci.yml' and 'code-quality.yml'
3. Remove node-cache since the project is not complex enough for it to
   be required
  • Loading branch information
supitsdu committed Nov 27, 2024
1 parent 338acef commit d277ed3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 63 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,46 @@ name: CI

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]

jobs:
build:
name: Test & Build

quality:
name: Quality & Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'

- name: Display Node.js version
run: node -v
- name: Setup Biome.js
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Install dependencies
run: npm ci

- name: Cache node_modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run linting
run: npm run lint
- name: Run linting & formatting
run: |
npm run lint
npm run format
- name: Run type-checking
run: npm run check-types

- name: Run tests
run: npm test

- name: Build the package
- name: Build package
run: npm run build
39 changes: 0 additions & 39 deletions .github/workflows/code-quality.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

permissions:
contents: read # Allow reading repository contents
Expand Down

0 comments on commit d277ed3

Please sign in to comment.