Skip to content

Commit

Permalink
chore: Small improvements to CI pipelines (#26690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk authored Mar 10, 2025
1 parent a5195a6 commit 78cde99
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 22 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: CI

on: [pull_request, push]

Expand Down Expand Up @@ -28,15 +28,13 @@ jobs:
cache: pnpm

- name: Install dependencies
run: pnpm i --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build

- name: Lint
run: |
pnpm run pretty:check
pnpm run eslint
- name: Check
run: pnpm run check

- name: Test
run: pnpm run test:coverage
Expand Down Expand Up @@ -180,6 +178,7 @@ jobs:
continue-on-error: true
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'
name: CodeQL

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: deps-review
name: Dependency review

on: [pull_request]

permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master

jobs:
fail_pr:
fail-pr-to-master:
runs-on: ubuntu-latest
steps:
- name: Fail PR to master
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
workflow_dispatch:

name: ghcr-cleanup
name: GHCR cleanup

permissions: {}
jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: merge-master-to-dev
name: Merge master to dev

on:
push:
branches:
- master

jobs:
merge_master_to_dev:
merge-master-to-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: write
pull-requests: write

name: release-please
name: Release Please

jobs:
release-please:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: stale
name: Stale

on:
schedule:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
name: Update dependencies

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

permissions:
contents: read
contents: write
pull-requests: write

jobs:
update_deps:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
token: ${{ secrets.GH_TOKEN }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: |
pnpm self-update
pnpm up --latest
- uses: peter-evans/create-pull-request@v7
id: cpr
with:
commit-message: 'fix(ignore): update dependencies'
branch: 'deps/all'
title: 'fix(ignore): update dependencies'
token: ${{ secrets.GH_TOKEN }}
- uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.cpr.outputs.pull-request-number }}
with:
issue-number: ${{ steps.cpr.outputs.pull-request-number }}
body: 'CC: @Koenkk'
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ on:
repository_dispatch:
types: update_dep

name: update-dep
name: Update dependency

permissions: {}
jobs:
update_dep:
update-dependency:
permissions:
contents: write
pull-requests: write
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"pretty:write": "prettier --write .",
"pretty:check": "prettier --check .",
"start": "node index.js",
"check": "pnpm run pretty:check && pnpm run eslint",
"test": "vitest run --config ./test/vitest.config.mts",
"test:coverage": "vitest run --config ./test/vitest.config.mts --coverage",
"test:watch": "vitest watch --config ./test/vitest.config.mts",
Expand Down

0 comments on commit 78cde99

Please sign in to comment.