Commit 50a2dc95 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

build: update cypress projectId (#3918)

* build: update cypress projectId

* build: rm unused cypress key

* test: save cypress videos

* build: rm start-server-and-test

* build: update github action cache usage

* build: use cypress action
parent 8cdec618
name: Crowdin Download name: Crowdin Download
# hourly we sync translations from Crowdin
on: on:
schedule: schedule:
- cron: '0 * * * *' # every hour we download translations and update the pr from crowdin - cron: '0 * * * *' # every hour we download translations and update the pr from crowdin
...@@ -15,25 +14,14 @@ jobs: ...@@ -15,25 +14,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up node - name: Set up node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile
......
name: Crowdin Upload name: Crowdin Upload
# on any push to main, we upload the translations to be translated
on: on:
push: push:
branches: branches:
...@@ -13,25 +12,14 @@ jobs: ...@@ -13,25 +12,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up node - name: Set up node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile
......
name: Integration Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
integration-tests:
name: Cypress
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn build
env:
CI: false # disables lint checks when building
- run: yarn serve &
- run: yarn cypress:run --record
env:
CYPRESS_INTEGRATION_TEST_PRIVATE_KEY: ${{ secrets.CYPRESS_INTEGRATION_TEST_PRIVATE_KEY }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
...@@ -15,25 +15,14 @@ jobs: ...@@ -15,25 +15,14 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up node - name: Set up node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile
......
...@@ -15,7 +15,7 @@ jobs: ...@@ -15,7 +15,7 @@ jobs:
changelog: ${{ steps.github_tag_action.outputs.changelog }} changelog: ${{ steps.github_tag_action.outputs.changelog }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Bump version and push tag - name: Bump version and push tag
id: github_tag_action id: github_tag_action
...@@ -32,13 +32,14 @@ jobs: ...@@ -32,13 +32,14 @@ jobs:
if: ${{ needs.bump_version.outputs.new_tag != null }} if: ${{ needs.bump_version.outputs.new_tag != null }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up node - name: Set up node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile
......
name: End-to-End Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
cypress-tests:
name: Run Cypress tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress install
uses: cypress-io/github-action@v4
with:
build: yarn build
start: yarn serve
wait-on: 'http://localhost:3000'
browser: chrome
record: true
env:
CI: false # disables lint checks when building
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Unit Tests name: Unit Tests
on: on:
push: push:
branches: branches:
...@@ -9,29 +10,18 @@ on: ...@@ -9,29 +10,18 @@ on:
jobs: jobs:
unit-tests: unit-tests:
name: Unit tests name: Run tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up node - name: Set up node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile
......
...@@ -41,4 +41,4 @@ package-lock.json ...@@ -41,4 +41,4 @@ package-lock.json
cypress/videos cypress/videos
cypress/screenshots cypress/screenshots
cypress/fixtures/example.json
import { defineConfig } from 'cypress' import { defineConfig } from 'cypress'
export default defineConfig({ export default defineConfig({
projectId: 'yp82ef', projectId: '5nvkck',
video: false, videoUploadOnPasses: false,
defaultCommandTimeout: 10000, defaultCommandTimeout: 10000,
chromeWebSecurity: false, chromeWebSecurity: false,
e2e: { e2e: {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment