Skip to content

Commit

Permalink
Merge pull request #675 from Teradata/feature/csae-380-openapi-key
Browse files Browse the repository at this point in the history
NIGHTLY Playwright job
  • Loading branch information
sreeramnitin authored Jul 26, 2024
2 parents 9846b97 + 285ea7b commit 05514d9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI
name: Nightly tests

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
test_env:
Expand All @@ -9,26 +12,31 @@ on:
options:
- CI
- PROD
notebooks:
description: 'The path to the notebooks to test. leave empty to test all notebooks'
required: false

defaults:
run:
working-directory: .tests
shell: bash

jobs:
test:
permissions:
contents: 'read'
id-token: 'write'
strategy:
fail-fast: false
matrix:
idx: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
matrix: ${{ github.event.inputs.notebooks == '' && fromJson('{"idx":[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}') || fromJson('{"idx":[0]}') }}
env:
CSAE_ENV_PASSWORD: '${{ secrets.CSAE_ENV_PASSWORD }}'
CSAE_PARALLEL_TESTS_COUNT: '${{ vars.CSAE_PARALLEL_TESTS_COUNT }}'
CSAE_WORKERS_COUNT: '${{ vars.CSAE_WORKERS_COUNT }}'
CSAE_NOTEBOOKS: ${{ github.event.inputs.notebooks }}
CSAE_ENV_PASSWORD: ${{ secrets.CSAE_ENV_PASSWORD }}
CSAE_PARALLEL_TESTS_COUNT: ${{ vars.CSAE_PARALLEL_TESTS_COUNT }}
CSAE_WORKERS_COUNT: ${{ vars.CSAE_WORKERS_COUNT }}
CSAE_CI_JOB_IDX: ${{ matrix.idx }}
TEST_ENV: ${{ github.event.inputs.test_env }}
CSAE_CI_JOB_COUNT: 10
TEST_ENV: ${{ github.event.inputs.test_env || 'PROD' }}
CSAE_CI_JOB_COUNT: ${{ github.event.inputs.notebooks == '' && '10' || '1' }}
name: Job ${{ matrix.idx }}
timeout-minutes: 1440
runs-on: ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion .tests/tests/jupytertest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ function loadTestData(filename): Input[] {
}

const skipfiles = readFileIntoArray(SKIPFILE_NAME)
const files = readFileIntoArray(FILE_NAME).filter((name) => skipfiles.indexOf(name) === -1);

let files;
if(process.env.CSAE_NOTEBOOKS){
files = process.env.CSAE_NOTEBOOKS.split(',').map((name) => name.trim());
}else{
files = readFileIntoArray(FILE_NAME).filter((name) => skipfiles.indexOf(name) === -1);
}

const testCount = Math.ceil(files.length / CSAE_CI_JOB_COUNT);

Expand Down

0 comments on commit 05514d9

Please sign in to comment.