diff --git a/.github/workflows/e2e-gatsby-workflow.yml b/.github/workflows/e2e-gatsby-workflow.yml index 3650870ac4c4..6d533286da35 100644 --- a/.github/workflows/e2e-gatsby-workflow.yml +++ b/.github/workflows/e2e-gatsby-workflow.yml @@ -6,7 +6,7 @@ on: - master pull_request: paths: - - .github/workflows/e2e-eslint-workflow.yml + - .github/workflows/e2e-gatsby-workflow.yml - scripts/e2e-setup-ci.sh name: 'E2E Gatsby' @@ -30,5 +30,13 @@ jobs: - name: 'Running the integration test' run: | source scripts/e2e-setup-ci.sh - yarn dlx gatsby new my-gatsby && cd my-gatsby + + yarn dlx gatsby new my-gatsby + cd my-gatsby + + # Test production build yarn build + + # Test development server (which includes development only loaders like eslint-loader) + # Redirect the output to log.txt and check if it contains "ERROR #" + yarn dlx start-server-and-test "yarn start > log.txt 2>&1" :8000 "! cat log.txt | grep \"ERROR #\"" diff --git a/.github/workflows/e2e-rollup-workflow.yml b/.github/workflows/e2e-rollup-workflow.yml index b0149d3e7565..c555bed85854 100644 --- a/.github/workflows/e2e-rollup-workflow.yml +++ b/.github/workflows/e2e-rollup-workflow.yml @@ -43,7 +43,7 @@ jobs: yarn rollup -c [[ "$(node dist/bundle.js)" = "125" ]] - cat dist/bundle.js | grep -v "square" + ! cat dist/bundle.js | grep "square" rm -rf dist src @@ -87,7 +87,7 @@ jobs: echo "import answer from 'the-answer'; import _ from 'lodash';" | tee src/main.js yarn rollup -c - cat dist/bundle.js | grep -v "lodash" + ! cat dist/bundle.js | grep "lodash" rm -rf src dist @@ -102,7 +102,7 @@ jobs: yarn rollup -c [[ "$(node dist/bundle.js)" = "the answer is 42" ]] - cat dist/bundle.js | grep -v "console.log(\`" + ! cat dist/bundle.js | grep "console.log(\`" rm -rf src dist