Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add TypeScript template to E2E test matrix #6768

Merged
merged 6 commits into from
Feb 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with Yarn v1
run: yarn install
working-directory: ../test-website
Expand All @@ -54,6 +52,12 @@ jobs:
strategy:
matrix:
nodeLinker: [pnp, node-modules]
variant: [-s, -st]
exclude:
# Running tsc on PnP requires additional installations, which is not
# worthwhile for a simple E2E test
- variant: -st
nodeLinker: pnp
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
Expand All @@ -63,10 +67,8 @@ jobs:
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Generate test-website project with ${{ matrix.variant }} against main branch
run: yarn test:build:website ${{ matrix.variant }}
- name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }}
run: |
yarn set version berry
Expand All @@ -92,6 +94,10 @@ jobs:
working-directory: ../test-website
env:
E2E_TEST: true
- name: Type check
if: matrix.variant == '-st'
run: yarn typecheck
working-directory: ../test-website
- name: Build test-website project
run: yarn build
working-directory: ../test-website
Expand All @@ -111,8 +117,6 @@ jobs:
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with NPM
run: npm install
working-directory: ../test-website
Expand Down Expand Up @@ -142,8 +146,6 @@ jobs:
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with PNPM
run: |
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
Expand Down
9 changes: 6 additions & 3 deletions admin/scripts/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").
CONTAINER_NAME="verdaccio"
EXTRA_OPTS=""

usage() { echo "Usage: $0 [-s]" 1>&2; exit 1; }
usage() { echo "Usage: $0 [-s] [-t]" 1>&2; exit 1; }

while getopts ":ns" o; do
while getopts ":st" o; do
case "${o}" in
s)
EXTRA_OPTS="${EXTRA_OPTS} --skip-install"
;;
t)
EXTRA_OPTS="${EXTRA_OPTS} --typescript"
;;
*)
usage
;;
Expand Down Expand Up @@ -52,7 +55,7 @@ cd ..
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic $EXTRA_OPTS

# Stop Docker container
if [[ -z "${KEEP_CONTAINER:-}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
if [[ -z "${KEEP_CONTAINER:-true}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
# Remove Docker container
docker container stop $CONTAINER_NAME > /dev/null
fi
Expand Down