Skip to content

Commit

Permalink
refactor(ga): reuse setup steps between jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed May 15, 2024
1 parent 34094a9 commit bcdcc40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
20 changes: 20 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: setup
description: "Setup bun and dependencies"
runs:
using: "composite"
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: install parallel
shell: bash
run: brew install parallel
if: runner.os == 'macOS'
- name: install dependencies
run: bun i
shell: bash
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ jobs:
# - os: windows-latest
# architecture: arm64
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: brew install parallel
if: runner.os == 'macOS'
- run: bun i
- uses: ./.github/actions/setup
- run: make tests

release:
Expand All @@ -47,7 +39,7 @@ jobs:
pull-requests: write
id-token: write
steps:
- uses: dyne/pnpm@v1
- uses: ./.github/actions/setup
- run: make all
- run: pnpm semantic-release
env:
Expand Down

0 comments on commit bcdcc40

Please sign in to comment.