Skip to content

Commit

Permalink
chore: add tests using registry
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Aug 22, 2023
1 parent 3f524ca commit 8e41eb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Update version locally
run: |
lerna version prerelease --yes --conventional-prerelease --preid test.$(git rev-parse --short HEAD) \
lerna version prerelease --yes --conventional-prerelease --preid test.$(git rev-parse --short HEAD) --ignore-scripts \
--force-publish --no-push --no-git-tag-version --exact
# Set TOLGEE_UI_VERSION for @tolgee/core build
Expand Down Expand Up @@ -87,12 +87,8 @@ jobs:
version: 7.16.0
run_install: false

- run: |
echo "" >> .npmrc
echo "link-workspace-packages=false" >> .npmrc
- name: Install
run: pnpm install --no-frozen-lockfile
run: pnpm install --ignore-workspace

- name: Create branch
run: git checkout -b test.$(git rev-parse --short HEAD)
Expand All @@ -103,14 +99,19 @@ jobs:
git config --local user.name "Tolgee Machine"
- run: |
echo "" >> .npmrc
echo "link-workspace-packages=false" >> .npmrc
echo "registry=https://npm.pkg.github.com/tolgee" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.TOLGEE_MACHINE_PAT }}" >> .npmrc
- name: Update version locally
run: |
lerna version prerelease --yes --conventional-prerelease --preid test.$(git rev-parse --short HEAD) \
lerna version prerelease --yes --conventional-prerelease --preid test.$(git rev-parse --short HEAD) --ignore-scripts \
--force-publish --no-push --no-git-tag-version --exact
- name: pnpm install
run: pnpm install --no-frozen-lockfile --filter='./testapps/*'

- name: Cypress
run: pnpm run e2e run --headed ${{matrix.app}} --stdout prod,dev

Expand Down
8 changes: 6 additions & 2 deletions scripts/customLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const path = require('path');
const location = path.join(locationDir, 'ngx');

fs.rmSync(location, { recursive: true, force: true });
fs.symlinkSync(path.relative(locationDir, target), location);
if (fs.existsSync(location)) {
fs.symlinkSync(path.relative(locationDir, target), location);
}
}

{
Expand All @@ -20,5 +22,7 @@ const path = require('path');
const location = path.join(locationDir, 'svelte');

fs.rmSync(location, { recursive: true, force: true });
fs.symlinkSync(path.relative(locationDir, target), location);
if (fs.existsSync(location)) {
fs.symlinkSync(path.relative(locationDir, target), location);
}
}

0 comments on commit 8e41eb0

Please sign in to comment.