Skip to content

Commit

Permalink
Upgrade dependencies and migrate to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Aug 25, 2023
1 parent e5bf936 commit 3096081
Show file tree
Hide file tree
Showing 6 changed files with 7,179 additions and 12,395 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,32 @@ jobs:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Cache Packages
id: cache
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
timeout-minutes: 1
${{ runner.os }}-pnpm-store-
- name: Install Packages
run: npm ci
run: pnpm install
timeout-minutes: 3

- name: Validate
- name: Validate and Build
if: "!startsWith(github.ref, 'refs/tags/')"
run: npm run validate
run: pnpm run validate
timeout-minutes: 3

- name: SonarCloud Scan
Expand Down
8 changes: 5 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
import { Config } from 'jest';

const config: Config = {
collectCoverage: false,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
coverageThreshold: {
Expand All @@ -10,15 +12,13 @@ module.exports = {
},
},
moduleDirectories: ['node_modules', 'src'],
preset: 'ts-jest',
setupFiles: ['<rootDir>/test/__setup__/setupFiles.ts'],
setupFilesAfterEnv: ['<rootDir>/test/__setup__/setupFilesAfterEnv.ts'],
snapshotSerializers: ['jest-serializer-html'],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost:1337/',
},
testMatch: null,
testRegex: '/test/.*?\\.(test|spec)\\.tsx?$',
transform: {
'^.+\\.m?[tj]sx?$': [
Expand All @@ -34,3 +34,5 @@ module.exports = {
verbose: false,
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};

export default config;
Loading

0 comments on commit 3096081

Please sign in to comment.