Skip to content

Commit

Permalink
refactor: migrate test-bin.yml to verify-build.yml without Docker
Browse files Browse the repository at this point in the history
- Remove `test-bin.yml` workflow that utilized `Docker`.
- Add a job in `verify-build.yml` to replace the functionality,
running with `pnpm` directly.
  • Loading branch information
carlosallexandre committed Dec 10, 2024
1 parent d55ed2d commit 3f561a0
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 61 deletions.
7 changes: 0 additions & 7 deletions .dockerignore

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/test-bin.yml

This file was deleted.

47 changes: 42 additions & 5 deletions .github/workflows/verify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ jobs:
build:
name: Verify Build
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -25,4 +22,44 @@ jobs:
- name: Test
run: npm run test:ci
- name: Build
run: npm run verify-build:catalog
working-directory: packages/core/
run: npm run build:bin
- name: Pack
working-directory: packages/core/
run: npm pack
- name: Rename package artifact
run: mv packages/core/*.tgz package.tgz # Rename to a consistent name

- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: package-artifact
path: package.tgz

test-bin:
needs: build
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: package-artifact
- name: Install package in ./examples/default/
working-directory: ./examples/default/
run: pnpm init && pnpm --ignore-workspace add ../../package.tgz
- name: Build event catalog in ./examples/default/
working-directory: ./examples/default/
env:
NODE_ENV: CI # Prevent raise event to analytics
run: pnpm exec eventcatalog build
20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

0 comments on commit 3f561a0

Please sign in to comment.