From e357cf34576da8adfb6c429be182fbc643333db6 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 17:42:52 -0400 Subject: [PATCH 1/8] Implement a first attempt at a Cypress Github action --- .github/workflows/cypress-local.yml | 21 +++++++++++++++++++++ package.json | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cypress-local.yml diff --git a/.github/workflows/cypress-local.yml b/.github/workflows/cypress-local.yml new file mode 100644 index 0000000000..6ee6bd291b --- /dev/null +++ b/.github/workflows/cypress-local.yml @@ -0,0 +1,21 @@ +name: Cypress + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + cypress-run: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cypress + uses: cypress-io/github-action@v2 + with: + build: npm run preview:local + start: npm start + wait-on: http://localhost:3000 + - run: npm ci \ No newline at end of file diff --git a/package.json b/package.json index 7b06d1174c..d7e12d6d2a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build:local": "TEMPORAL_UI_BUILD_TARGET=local svelte-kit build", "build:cloud": "TEMPORAL_UI_BUILD_TARGET=cloud svelte-kit build", "test": "jest", - "preview": "svelte-kit preview", + "preview:local": "TEMPORAL_UI_BUILD_TARGET=local svelte-kit preview", + "preview:cloud": "TEMPORAL_UI_BUILD_TARGET=cloud svelte-kit preview", "check": "TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json", "check:watch": "TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json --watch", "check:local": "TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json", From 68117747d00b932dbaf254a03611bec5fb783264 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 17:42:59 -0400 Subject: [PATCH 2/8] Update cypress-local.yml --- .github/workflows/cypress-local.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-local.yml b/.github/workflows/cypress-local.yml index 6ee6bd291b..51ff98b282 100644 --- a/.github/workflows/cypress-local.yml +++ b/.github/workflows/cypress-local.yml @@ -18,4 +18,4 @@ jobs: build: npm run preview:local start: npm start wait-on: http://localhost:3000 - - run: npm ci \ No newline at end of file + - run: npm ci From 507b0950a6b44bf7dc619519541c1308243c84b1 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 17:45:50 -0400 Subject: [PATCH 3/8] Update cypress-local.yml --- .github/workflows/cypress-local.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cypress-local.yml b/.github/workflows/cypress-local.yml index 51ff98b282..a2fc9ef600 100644 --- a/.github/workflows/cypress-local.yml +++ b/.github/workflows/cypress-local.yml @@ -12,10 +12,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - run: npm ci - name: Cypress uses: cypress-io/github-action@v2 with: build: npm run preview:local - start: npm start wait-on: http://localhost:3000 - - run: npm ci From 8799568ad69cd230a4f4c071280bac6819e750d9 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 17:52:29 -0400 Subject: [PATCH 4/8] Try building it first --- .github/workflows/cypress-local.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-local.yml b/.github/workflows/cypress-local.yml index a2fc9ef600..a24cb0eccb 100644 --- a/.github/workflows/cypress-local.yml +++ b/.github/workflows/cypress-local.yml @@ -16,5 +16,6 @@ jobs: - name: Cypress uses: cypress-io/github-action@v2 with: - build: npm run preview:local + build: npm run build:local + start: npm run preview:local wait-on: http://localhost:3000 From 25efbda32228f572b968411348c8d10c5f0e154d Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 18:12:18 -0400 Subject: [PATCH 5/8] Add cloud run for Cypress --- .github/workflows/cypress-cloud.yml | 21 +++++++++++++++++++++ .github/workflows/cypress-local.yml | 2 +- .github/workflows/lint-and-unit-test.yml | 9 +++------ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/cypress-cloud.yml diff --git a/.github/workflows/cypress-cloud.yml b/.github/workflows/cypress-cloud.yml new file mode 100644 index 0000000000..2c33f5d2b4 --- /dev/null +++ b/.github/workflows/cypress-cloud.yml @@ -0,0 +1,21 @@ +name: Cypress (Cloud) + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + cypress-run: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - run: npm ci + - name: Cypress + uses: cypress-io/github-action@v2 + with: + build: npm run build:cloud + start: npm run preview:cloud + wait-on: http://localhost:3000 diff --git a/.github/workflows/cypress-local.yml b/.github/workflows/cypress-local.yml index a24cb0eccb..4a74f387f5 100644 --- a/.github/workflows/cypress-local.yml +++ b/.github/workflows/cypress-local.yml @@ -1,4 +1,4 @@ -name: Cypress +name: Cypress (Local) on: push: diff --git a/.github/workflows/lint-and-unit-test.yml b/.github/workflows/lint-and-unit-test.yml index b66366a322..29e07b6401 100644 --- a/.github/workflows/lint-and-unit-test.yml +++ b/.github/workflows/lint-and-unit-test.yml @@ -1,7 +1,4 @@ -# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Lint and Test +name: Unit Tests and Linting on: push: @@ -19,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v2 with: - node-version: ${{ matrix.node-version }} + node-version: 16.x cache: 'npm' - run: npm ci - run: npm run lint --if-present From 7d7e09be48dc77aa94c527adc60ee04a8ecf3df1 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 18:12:23 -0400 Subject: [PATCH 6/8] Update lint-and-unit-test.yml --- .github/workflows/lint-and-unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-unit-test.yml b/.github/workflows/lint-and-unit-test.yml index 29e07b6401..31df1b888a 100644 --- a/.github/workflows/lint-and-unit-test.yml +++ b/.github/workflows/lint-and-unit-test.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js + - name: Use Node.js uses: actions/setup-node@v2 with: node-version: 16.x From 261413bbe13e1f6a6a1fe9ef9150d476fd5811c1 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 18:29:45 -0400 Subject: [PATCH 7/8] Update lint-and-unit-test.yml --- .github/workflows/lint-and-unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-unit-test.yml b/.github/workflows/lint-and-unit-test.yml index 31df1b888a..08d135e985 100644 --- a/.github/workflows/lint-and-unit-test.yml +++ b/.github/workflows/lint-and-unit-test.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js + - name: ESLint and Jest uses: actions/setup-node@v2 with: node-version: 16.x From 2a7a56f88e9e928e0bd92662d81fe976f7472d11 Mon Sep 17 00:00:00 2001 From: Steve Kinney Date: Thu, 8 Jul 2021 18:37:55 -0400 Subject: [PATCH 8/8] Remove the .gitkeeps --- src/components/.gitkeep | 0 src/utilities/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/components/.gitkeep delete mode 100644 src/utilities/.gitkeep diff --git a/src/components/.gitkeep b/src/components/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/utilities/.gitkeep b/src/utilities/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000