Merge pull request #1737 from 4GeeksAcademy/development #1918
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Test | |
on: | |
push: | |
branches: | |
- development | |
- master | |
pull_request: | |
branches: | |
- development | |
- master | |
pull_request_target: | |
types: [opened] | |
branches: | |
- development | |
- master | |
jobs: | |
cypress-test: | |
name: Test with Server | |
runs-on: ubuntu-latest | |
env: # environment variable | |
GATSBY_BREATHECODE_HOST: https://breathecode-test.herokuapp.com/v1 | |
strategy: | |
matrix: | |
node: [14.x] | |
steps: | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- name: Install Node dependencies | |
run: npm install | |
- name: Running Tests | |
# Install NPM dependencies, cache them correctly | |
uses: cypress-io/github-action@v4 | |
with: | |
build: npm run build | |
start: npm run serve | |
browser: chrome | |
wait-on: 'http://localhost:8080' | |
config: pageLoadTimeout=100000,baseUrl=http://localhost:8080 |