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 new file mode 100644 index 0000000000..4a74f387f5 --- /dev/null +++ b/.github/workflows/cypress-local.yml @@ -0,0 +1,21 @@ +name: Cypress (Local) + +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:local + start: npm run preview:local + wait-on: http://localhost:3000 diff --git a/.github/workflows/lint-and-unit-test.yml b/.github/workflows/lint-and-unit-test.yml index b66366a322..08d135e985 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: ESLint and Jest 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 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", 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