Run e2e tests on GH actions (#12517)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Juan Picado <juanpicado19@gmail.com>
This commit is contained in:
@@ -23,10 +23,13 @@ cd ../..
|
||||
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
|
||||
|
||||
node "$PWD"/scripts/integration-tests/utils/bump-babel-dependencies.js
|
||||
|
||||
(
|
||||
yarn why @babel/core | grep -o "@babel/core@npm:.* (via npm:.*)";
|
||||
yarn why @babel/helpers | grep -o "@babel/helpers@npm:.* (via npm:.*)";
|
||||
yarn why @babel/traverse | grep -o "@babel/traverse@npm:.* (via npm:.*)"
|
||||
# Yarn prints colors on GH actions even if it's piped, unless explicitly disabled
|
||||
# https://github.com/yarnpkg/berry/pull/659
|
||||
YARN_ENABLE_COLORS=0 yarn why @babel/core | grep -o "@babel/core@npm:.* (via npm:.*)";
|
||||
YARN_ENABLE_COLORS=0 yarn why @babel/helpers | grep -o "@babel/helpers@npm:.* (via npm:.*)";
|
||||
YARN_ENABLE_COLORS=0 yarn why @babel/traverse | grep -o "@babel/traverse@npm:.* (via npm:.*)"
|
||||
) | uniq | node -e "
|
||||
var pkg = require('./package.json');
|
||||
var packages = fs.readFileSync(0, 'utf8').trim().split('\n');
|
||||
|
||||
@@ -28,10 +28,10 @@ yarn
|
||||
startLocalRegistry "$PWD"/scripts/integration-tests/verdaccio-config.yml
|
||||
loginLocalRegistry
|
||||
|
||||
# This script gets the last @babel/standalone version (because it's always published),
|
||||
# This script gets the last root package.json version,
|
||||
# and then increases by one the patch number
|
||||
VERSION=$(
|
||||
node -p "'$(npm view @babel/standalone version)'.replace(/(?<=\\d+\\.\\d+\\.)\\d+/, x => ++x)"
|
||||
node -p "require('./package.json').version.replace(/(?<=\\d+\\.\\d+\\.)\\d+/, x => ++x)"
|
||||
)
|
||||
|
||||
I_AM_USING_VERDACCIO=I_AM_SURE VERSION="$VERSION" make publish-test
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
# Copied from https://github.com/facebook/create-react-app/blob/053f9774d3f592c17741d2a86de66a7ca58f90c0/tasks/local-registry.sh
|
||||
|
||||
custom_registry_url=http://localhost:4873
|
||||
default_verdaccio_package=verdaccio@~4.3.3
|
||||
default_verdaccio_package=verdaccio@~4.11.1
|
||||
|
||||
function startLocalRegistry {
|
||||
# Start local registry
|
||||
tmp_registry_log=`mktemp`
|
||||
echo "Registry output file: $tmp_registry_log"
|
||||
(cd && nohup npx ${VERDACCIO_PACKAGE:-$default_verdaccio_package} -c $1 &>$tmp_registry_log &)
|
||||
|
||||
yarn global add verdaccio-memory@~9.7.2
|
||||
# Wait for Verdaccio to boot
|
||||
grep -q "http address" <(tail -f $tmp_registry_log)
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ uplinks:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
'@*/*':
|
||||
"@*/*":
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $all
|
||||
unpublish: $all
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
"**":
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
@@ -54,7 +54,7 @@ middlewares:
|
||||
|
||||
# log settings
|
||||
logs:
|
||||
- { type: stdout, format: pretty, level: http }
|
||||
- { type: stdout, format: pretty, level: warn }
|
||||
#- {type: file, path: verdaccio.log, level: info}
|
||||
#experiments:
|
||||
# # support for npm token command
|
||||
|
||||
Reference in New Issue
Block a user