ktmud commented on a change in pull request #9490: [Build] Add Github workflows
URL: 
https://github.com/apache/incubator-superset/pull/9490#discussion_r406008138
 
 

 ##########
 File path: .github/workflows/superset-e2e.yml
 ##########
 @@ -0,0 +1,80 @@
+name: E2E
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+
+jobs:
+  cypress:
+    name: Cypress
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.6]
+    env:
+      SUPERSET_CONFIG: tests.superset_test_config
+      PYTHONPATH: ${{ github.workspace }}
+      REDIS_PORT: 16379
+      CI: github-actions
+      CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
+      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    services:
+      redis:
+        image: redis:5-alpine
+        ports:
+          - 16379:6379
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v1
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Cache pip
+      uses: actions/cache@v1
+      with:
+        path: ~/.cache/pip
+        key: ${{ runner.os }}-pip-${{ hashFiles('./requirements*.txt') }}
+        restore-keys: |
+          ${{ runner.os }}-pip-
+    - name: Cache npm
+      uses: actions/cache@v1
+      with:
+        path: |
+          ~/.npm
+          superset-frontend/.terser-plugin-cache/
+        key: ${{ runner.os }}-npm-${{ 
hashFiles('superset-frontend/package-lock.json') }}
+        restore-keys: |
+          ${{ runner.os }}-npm-
+    - name: Install dependencies
+      uses: ./.github/actions/setup-superset
+      with:
+        prepare: backend frontend testdata
+    - name: Cypress run all
+      uses: cypress-io/github-action@v1
+      with:
+        working-directory: ./superset-frontend/cypress-base
+        # cannot use `superset run` because it starts the app somehow 
differently
+        # and would not respect the `SUPERSET_CONFIG` env
+        start: flask run -p 8081 --no-debugger
+        wait-on: http://localhost:8081
+        wait-on-timeout: 10
+        spec: cypress/integration/*/*
+        record: true
 
 Review comment:
   I'm enabling recording as it's free anyway. Check the recorded logs 
[here](https://dashboard.cypress.io/projects/dk2opw/).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to