Skip to content

Commit

Permalink
ci: update actions to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusTheHun committed Dec 10, 2024
1 parent b537e7a commit 76277b3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,33 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 18.x
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: '.nvmrc'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm i

- name: Vitest cache
uses: actions/cache@v4
with:
path: ./node_modules/.vite/vitest/results.json
key: vitest-cache-${{ github.ref_name }}
restore-keys: |
vitest-cache-${{ github.ref_name }}
- name: Tests
run: npm run test:ci
- name: Run tests
id: tests
run: pnpm vitest --run --bail 5

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run release
cd packages/storybook-addon-remix-react-router && pnpm run release
29 changes: 19 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,26 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 18.x
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: '.nvmrc'
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: bahmutov/npm-install@v1
run: pnpm i

- name: Vitest cache
uses: actions/cache@v4
with:
path: ./node_modules/.vite/vitest/results.json
key: vitest-cache-${{ github.ref_name }}
restore-keys: |
vitest-cache-${{ github.ref_name }}
- name: Tests
run: npm run test:ci
- name: Run tests
id: tests
run: pnpm vitest --run
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22

0 comments on commit 76277b3

Please sign in to comment.