Skip to content

Commit

Permalink
chore: add starter integration test to ci (#2660)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

For every pull request we do on faststore we must test the package
against the starter. This is time consuming, and non error-prone since
the local setup of each developer can vary.

The test runs on ci, and:

1. build the packages
2. generate a tarball for them with npm pack
3. clone the starter
4. install the packaged packages
5. run build
  • Loading branch information
matheusps authored Jan 31, 2025
1 parent 2f900c9 commit a5c69a3
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cache: 'yarn'

- name: Install dependencies
run: yarn
run: yarn --frozen-lockfile

- name: Build
run: yarn build
Expand All @@ -41,3 +41,32 @@ jobs:

- name: Test
run: yarn test

- name: Pack packages
run: |
mkdir -p packed-packages
for package in packages/*; do
if [ -d "$package" ]; then
(cd "$package" && npm pack --pack-destination ../../packed-packages)
fi
done
- name: Clone starter
run: git clone https://github.com/vtex-sites/starter.store.git starter

- name: Install the packages on starter
run: |
cd starter
for package in ../packed-packages/*.tgz; do
yarn add "$package"
done
- name: Install dependencies in starter
run: |
cd starter
yarn install --frozen-lockfile
- name: Build starter
run: |
cd starter
yarn build

0 comments on commit a5c69a3

Please sign in to comment.