sdadfadas

Форк
0
/
superset-applitool-cypress.yml 
92 строки · 2.7 Кб
1
name: Applitools Cypress
2

3
on:
4
  schedule:
5
    - cron: "0 1 * * *"
6

7
jobs:
8
  config:
9
    runs-on: "ubuntu-22.04"
10
    outputs:
11
      has-secrets: ${{ steps.check.outputs.has-secrets }}
12
    steps:
13
      - name: "Check for secrets"
14
        id: check
15
        shell: bash
16
        run: |
17
          if [ -n "${{ (secrets.APPLITOOLS_API_KEY != '' && secrets.APPLITOOLS_API_KEY != '') || '' }}" ]; then
18
            echo "has-secrets=1" >> "$GITHUB_OUTPUT"
19
          fi
20

21
  cypress-applitools:
22
    needs: config
23
    if: needs.config.outputs.has-secrets
24
    runs-on: ubuntu-22.04
25
    strategy:
26
      fail-fast: false
27
      matrix:
28
        browser: ["chrome"]
29
        node: [18]
30
    env:
31
      SUPERSET_ENV: development
32
      SUPERSET_CONFIG: tests.integration_tests.superset_test_config
33
      SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
34
      PYTHONPATH: ${{ github.workspace }}
35
      REDIS_PORT: 16379
36
      GITHUB_TOKEN: ${{ github.token }}
37
      APPLITOOLS_APP_NAME: Superset
38
      APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
39
      APPLITOOLS_BATCH_ID: ${{ github.sha }}
40
      APPLITOOLS_BATCH_NAME: Superset Cypress
41
    services:
42
      postgres:
43
        image: postgres:15-alpine
44
        env:
45
          POSTGRES_USER: superset
46
          POSTGRES_PASSWORD: superset
47
        ports:
48
          - 15432:5432
49
      redis:
50
        image: redis:7-alpine
51
        ports:
52
          - 16379:6379
53
    steps:
54
      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
55
        uses: actions/checkout@v4
56
        with:
57
          persist-credentials: false
58
          submodules: recursive
59
          ref: master
60
      - name: Setup Python
61
        uses: ./.github/actions/setup-backend/
62
      - name: Import test data
63
        uses: ./.github/actions/cached-dependencies
64
        with:
65
          run: testdata
66
      - name: Setup Node.js
67
        uses: actions/setup-node@v4
68
        with:
69
          node-version: ${{ matrix.node }}
70
      - name: Install npm dependencies
71
        uses: ./.github/actions/cached-dependencies
72
        with:
73
          run: npm-install
74
      - name: Build javascript packages
75
        uses: ./.github/actions/cached-dependencies
76
        with:
77
          run: build-instrumented-assets
78
      - name: Setup Postgres
79
        if: steps.check.outcome == 'failure'
80
        uses: ./.github/actions/cached-dependencies
81
        with:
82
          run: setup-postgres
83
      - name: Install cypress
84
        uses: ./.github/actions/cached-dependencies
85
        with:
86
          run: cypress-install
87
      - name: Run Cypress
88
        uses: ./.github/actions/cached-dependencies
89
        env:
90
          CYPRESS_BROWSER: ${{ matrix.browser }}
91
        with:
92
          run: cypress-run-applitools
93

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.