Merge pull request #258 from ruisaraiva19/develop

chore: release
This commit is contained in:
Rui Saraiva 2020-09-19 21:57:39 +01:00 committed by GitHub
commit 7b36d535dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 43 deletions

View File

@ -3,31 +3,34 @@ name: Tests
on: pull_request
jobs:
wait_deploy:
name: Wait Vercel Deploy
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/wait-for-vercel-preview@master
id: waitForVercelPreviewDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 120
test_e2e:
name: Run Cypress
needs: wait_deploy
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Run Cypress
uses: cypress-io/github-action@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
config: baseUrl=${{ needs.wait_deploy.outputs.preview_url }}
wait-on: ${{ needs.wait_deploy.outputs.preview_url }}
wait-on-timeout: 120
node-version: "12"
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Cache Next.js build cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Build static assets
run: yarn build
- name: Run Cypress
uses: cypress-io/github-action@v2
with:
start: npm start
wait-on: http://localhost:3000
# after the test run completes
# store videos and any screenshots
# NOTE: screenshots will be generated only if E2E test failed

View File

@ -5,14 +5,14 @@ describe('Drag & Drop', () => {
beforeEach(() => {
cy.viewport(1280, 720)
cy.visit('/')
cy.wait(200)
cy.wait(250)
})
function dropFile(fixture) {
cy.get('[data-cy="drag-and-drop"]').attachFile(fixture, {
subjectType: 'drag-n-drop',
})
cy.wait(20)
cy.wait(50)
}
it('Drop 310x310 PNG file', () => {

View File

@ -1,7 +0,0 @@
/// <reference types="cypress" />
describe('My First Test', () => {
it('Visits the Favycon', () => {
cy.visit('/')
})
})

View File

@ -100,7 +100,7 @@
"babel-plugin-prismjs": "2.0.1",
"babel-preset-react-app": "9.1.2",
"commitizen": "4.2.1",
"cypress": "5.1.0",
"cypress": "5.2.0",
"cypress-file-upload": "4.1.1",
"cz-conventional-changelog": "3.3.0",
"dotenv": "8.2.0",
@ -116,12 +116,12 @@
"eslint-plugin-react": "7.20.6",
"eslint-plugin-react-hooks": "4.1.2",
"husky": "4.3.0",
"lint-staged": "10.3.0",
"lint-staged": "10.4.0",
"npm-run-all": "4.1.5",
"postcss-100vh-fix": "0.1.1",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-preset-env": "6.7.0",
"prettier": "2.1.1",
"prettier": "2.1.2",
"react-refresh": "0.8.3",
"regenerator-runtime": "0.13.7",
"sass": "1.26.10",

View File

@ -6534,10 +6534,10 @@ cypress-file-upload@4.1.1:
dependencies:
mime "^2.4.4"
cypress@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.1.0.tgz#979e9ff3e0acd792eefd365bf104046479a9643b"
integrity sha512-craPRO+Viu4268s7eBvX5VJW8aBYcAQT+EwEccQSMY+eH1ZPwnxIgyDlmMWvxLVX9SkWxOlZbEycPyzanQScBQ==
cypress@5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-5.2.0.tgz#6902efd90703242a2539f0623c6e1118aff01f95"
integrity sha512-9S2spcrpIXrQ+CQIKHsjRoLQyRc2ehB06clJXPXXp1zyOL/uZMM3Qc20ipNki4CcNwY0nBTQZffPbRpODeGYQg==
dependencies:
"@cypress/listr-verbose-renderer" "^0.4.1"
"@cypress/request" "^2.88.5"
@ -10375,10 +10375,10 @@ lines-and-columns@^1.1.6:
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
lint-staged@10.3.0:
version "10.3.0"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.3.0.tgz#388c3d440590c45c339e7163f669ea69ae90b1e0"
integrity sha512-an3VgjHqmJk0TORB/sdQl0CTkRg4E5ybYCXTTCSJ5h9jFwZbcgKIx5oVma5e7wp/uKt17s1QYFmYqT9MGVosGw==
lint-staged@10.4.0:
version "10.4.0"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.4.0.tgz#d18628f737328e0bbbf87d183f4020930e9a984e"
integrity sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg==
dependencies:
chalk "^4.1.0"
cli-truncate "^2.1.0"
@ -13255,10 +13255,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6"
integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==
prettier@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
prettier@^1.16.4:
version "1.19.1"