Skip to content

Commit

Permalink
chore: update pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunnerLivio committed Jan 25, 2025
1 parent 6b8b03e commit fa07675
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 2,235 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/build-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list

# FIXME: Remove the `--legacy-peer-deps` flag once all dependencies are updated
- run: npm ci --legacy-peer-deps
- run: npm run build:all
- run: npm run test:samples
env:
CI: true
- run: pnpm i
- run: pnpm build:all
32 changes: 8 additions & 24 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: docker compose up -d

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list


# FIXME: Remove the `--legacy-peer-deps` flag once all dependencies are updated
- run: npm ci --legacy-peer-deps
- run: npm run test:e2e
- run: docker compose up -d
- run: pnpm i
- run: pnpm build:all
- run: pnpm test:e2e:all
35 changes: 11 additions & 24 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,20 @@ on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list

# FIXME: Remove the `--legacy-peer-deps` flag once all dependencies are updated
- run: npm ci --legacy-peer-deps
- run: npm run format
- run: pnpm i
- run: pnpm format
37 changes: 12 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
name: Lint
name: Format

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list

# FIXME: Remove the `--legacy-peer-deps` flag once all dependencies are updated
- run: npm ci --legacy-peer-deps
- run: npm run lint
- run: pnpm i
- run: pnpm lint
28 changes: 6 additions & 22 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List the state of node modules
continue-on-error: true
run: npm list
cache: 'pnpm'


# FIXME: Remove the `--legacy-peer-deps` flag once all dependencies are updated
- run: npm ci --legacy-peer-deps
- run: npm run build
- run: npm test
- run: pnpm i
- run: pnpm build:all
- run: pnpm test:all
env:
CI: true
2 changes: 1 addition & 1 deletion lib/health-indicator/http/http.health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type * as NestJSAxios from '@nestjs/axios';
import { ConsoleLogger, Inject, Injectable, Scope } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { lastValueFrom, type Observable } from 'rxjs';
import { type HealthIndicatorResult } from '..';
import {
type AxiosRequestConfig,
type AxiosResponse,
} from './axios.interfaces';
import { type HealthIndicatorResult } from '..';
import { type AxiosError } from '../../errors/axios.error';
import { TERMINUS_LOGGER } from '../../health-check/logger/logger.provider';
import { checkPackages, isAxiosError } from '../../utils';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
"optional": true
}
},
"packageManager": "[email protected]",
"lint-staged": {
"*.ts": [
"prettier --write"
Expand Down
Loading

0 comments on commit fa07675

Please sign in to comment.