Skip to content

Commit

Permalink
workflow updates
Browse files Browse the repository at this point in the history
  • Loading branch information
couetilc committed Jan 19, 2025
1 parent 40a6736 commit a953474
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 50 deletions.
15 changes: 11 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ updates:
schedule:
interval: "weekly"
groups:
production-dependencies:
dependency-type: "production"
development-dependencies:
dependency-type: "development"
dependencies:
patterns:
- "*"
ignore:
- dependency-name: "eslint"
- dependency-name: "eslint-config-prettier"
- dependency-name: "eslint-plugin-json"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
groups:
dependencies:
patterns:
- "*"
61 changes: 17 additions & 44 deletions .github/workflows/build_test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,33 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: 'https://registry.npmjs.org'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install
run:
pnpm install

- name: Install compatible testing library for older react versions
if: ${{ matrix.react-version }} < 18
run: pnpm add -D @testing-library/react@12
run: |
if [ ${{ matrix.react-version }} < 18 ]; then
pnpm add -D @testing-library/react@12
else
pnpm update @testing-library/react
fi
- name: Install React v${{ matrix.react-version }}
run: pnpm i react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }}

- name: Test build
run: pnpm run build
run: pnpm build

- name: Test React v${{ matrix.react-version }}
run: pnpm test
Expand All @@ -71,31 +60,15 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: 'https://registry.npmjs.org'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Publish
run: |
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.5.1
22.13.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@
"react-dom": "^19.0.0"
},
"packageManager": "[email protected]"
}
}

0 comments on commit a953474

Please sign in to comment.