Skip to content

Commit

Permalink
Fixing integration tests (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
rezrah authored Oct 16, 2023
1 parent daca48b commit 9804234
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/integration_test_astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: Caching dependencies
uses: actions/cache@v2
Expand Down Expand Up @@ -104,5 +104,12 @@ jobs:
- name: Testing compile-time build
run: cd ${{env.ASTRO_FOLDER}} && npm run build

# Cypress is not able to run tests in the Astro project due to bundler errors
# Local tsconfig compilerOptions are not respected
# FIXME: When there is a workaround in both Cypress and Astro
# See https://github.com/cypress-io/cypress/issues/28052
- name: Remove base tsconfig due to bundler error
run: npx json -I -f ${{env.ASTRO_FOLDER}}/tsconfig.json -e 'delete this.extends'

- name: Test runtime for errors and warnings
run: cd ${{env.ASTRO_FOLDER}} && npx start-server-and-test 'npx http-server ./dist -p 3000' 3000 'npx cypress run --spec "./integration-tests/tests/*" --config video=false'
5 changes: 5 additions & 0 deletions .github/workflows/integration_test_cra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ jobs:
- name: Excluded cypress tests in-place
run: npx json -I -f ${{env.CRA_FOLDER}}/tsconfig.json -e 'this.exclude=["node_modules", "**/*.cy.ts"]'

# We use start to respect reading direction
# autoprefixer warning can be safely ignored here
- name: Remove autoprefixer warning about start vs flex-start
run: npx json -I -f ${{env.CRA_FOLDER}}/package.json -e 'this.ignoreWarnings = ["autoprefixer: start value has mixed support, consider using flex-start instead"]'

- name: Testing compile-time build
run: cd ${{env.CRA_FOLDER}} && npm run build

Expand Down

0 comments on commit 9804234

Please sign in to comment.