0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(test): refactor integration-test workflow to link mock connectors (#1720)

* refactor(test): another way to link mock connectors in integration tests

* refactor(test): extract link-mock-connectors.sh

* refactor(test): remove unused env variable in integration-test.yml
This commit is contained in:
IceHe.Life 2022-08-02 18:10:01 +08:00 committed by GitHub
parent a62793a3f0
commit ff151b2010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 14 deletions

View file

@ -22,9 +22,9 @@ jobs:
uses: silverhand-io/actions-node-pnpm-run-steps@v1.2.3
- name: Package
run: ./package.sh
env:
INTEGRATION_TEST: true
run: |
./link-mock-connectors.sh
./package.sh
- uses: actions/upload-artifact@v3
with:

11
link-mock-connectors.sh Executable file
View file

@ -0,0 +1,11 @@
set -eo pipefail
echo Link the mock connectors for integration tests only
cd packages/core
pnpm link @logto/connector-mock-sms
pnpm link @logto/connector-mock-email
pnpm link @logto/connector-mock-social
cd -
echo Update the pnpm-lock.json
pnpm i --no-frozen-lockfile --lockfile-only

View file

@ -7,17 +7,7 @@ echo Prune dependencies
rm -rf node_modules packages/*/node_modules
echo Install production dependencies
if [[ $INTEGRATION_TEST =~ ^(true|1)$ ]]; then
echo Install the mock connectors for integration tests only
cd packages/core
pnpm link @logto/connector-mock-sms
pnpm link @logto/connector-mock-email
pnpm link @logto/connector-mock-social
cd -
NODE_ENV=production pnpm i --no-frozen-lockfile
else
NODE_ENV=production pnpm i
fi
NODE_ENV=production pnpm i
echo Prune files
rm -rf \