Skip to content

Commit

Permalink
Add localhost to /etc/hosts in the cypress container
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Jun 13, 2024
1 parent e54e503 commit d30aed5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ jobs:
node-version-file: .tool-versions
- name: Node Version
run: node -v
# Seems like this isn't defined in the Cypress container?
- name: Add localhost to /etc/hosts
run: |
echo "127.0.0.1 localhost" | tee -a /etc/hosts
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: yarn start
wait-on: 'http://127.0.0.1:3000' # Waits for above
wait-on: 'http://localhost:3000' # Waits for above
browser: chrome
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
Expand Down
1 change: 0 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function fixAcceptHeader404() {
export default defineConfig(() => ({
base: '/pd-live-react',
server: {
host: '127.0.0.1',
port: 3000,
},
build: {
Expand Down

0 comments on commit d30aed5

Please sign in to comment.