From 8ddd1f447533a2ea31e01fff6ed1fcb2da74d443 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 12 Mar 2024 11:14:00 +0100 Subject: [PATCH 1/5] first try to run nightly tests --- .github/workflows/CI_nightly.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/CI_nightly.yml diff --git a/.github/workflows/CI_nightly.yml b/.github/workflows/CI_nightly.yml new file mode 100644 index 000000000..1e175c085 --- /dev/null +++ b/.github/workflows/CI_nightly.yml @@ -0,0 +1,45 @@ +name: nightly + +on: + workflow_dispatch: # Activate this workflow manually + schedule: + - cron: "0 0 * * *" + # TODO: rm the following event + push: + branches: + - nightly + +jobs: + run: + name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.8', '3.9', '3.10'] + + steps: + - name: Support longpaths + if: matrix.os == 'windows-latest' + working-directory: . + run: git config --system core.longpaths true + + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Hatch + run: pip install --upgrade hatch + + - name: Run tests + run: | + for d in integrations/* ; do + cd $d + hatch hatch run cov + hatch env prune # clean up the environment after docs generation + cd - + done \ No newline at end of file From ea06da2992f75cbc5a64f6724160b12bdde895c7 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 12 Mar 2024 11:17:39 +0100 Subject: [PATCH 2/5] fix --- .github/workflows/CI_nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_nightly.yml b/.github/workflows/CI_nightly.yml index 1e175c085..a94673b94 100644 --- a/.github/workflows/CI_nightly.yml +++ b/.github/workflows/CI_nightly.yml @@ -39,7 +39,7 @@ jobs: run: | for d in integrations/* ; do cd $d - hatch hatch run cov + hatch run cov hatch env prune # clean up the environment after docs generation cd - done \ No newline at end of file From 9b338affdaebcfdf83abf980f61b447e621f7e4a Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 12 Mar 2024 11:23:45 +0100 Subject: [PATCH 3/5] some defaults --- .github/workflows/CI_nightly.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/CI_nightly.yml b/.github/workflows/CI_nightly.yml index a94673b94..e138709f0 100644 --- a/.github/workflows/CI_nightly.yml +++ b/.github/workflows/CI_nightly.yml @@ -9,6 +9,15 @@ on: branches: - nightly +permissions: + id-token: write + contents: read + +env: + PYTHONUNBUFFERED: "1" + FORCE_COLOR: "1" + AWS_REGION: us-east-1 + jobs: run: name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} @@ -35,6 +44,12 @@ jobs: - name: Install Hatch run: pip install --upgrade hatch + - name: AWS authentication + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 + with: + aws-region: ${{ env.AWS_REGION }} + role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} + - name: Run tests run: | for d in integrations/* ; do From dfea16abe1ffe4a03864498302336a41f70c93ff Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 12 Mar 2024 11:35:43 +0100 Subject: [PATCH 4/5] skip sagemaker --- .github/workflows/CI_nightly.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_nightly.yml b/.github/workflows/CI_nightly.yml index e138709f0..84454678d 100644 --- a/.github/workflows/CI_nightly.yml +++ b/.github/workflows/CI_nightly.yml @@ -53,8 +53,10 @@ jobs: - name: Run tests run: | for d in integrations/* ; do - cd $d - hatch run cov - hatch env prune # clean up the environment after docs generation - cd - + if [ "$(basename $d)" != "amazon_sagemaker" ]; then + cd $d + hatch run cov + hatch env prune # clean up the environment after docs generation + cd - + fi done \ No newline at end of file From 319a1b4d63391020288846b2ab7696f263b7076e Mon Sep 17 00:00:00 2001 From: anakin87 Date: Tue, 12 Mar 2024 11:42:52 +0100 Subject: [PATCH 5/5] support windows --- .github/workflows/CI_nightly.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI_nightly.yml b/.github/workflows/CI_nightly.yml index 84454678d..edf58d0bd 100644 --- a/.github/workflows/CI_nightly.yml +++ b/.github/workflows/CI_nightly.yml @@ -52,11 +52,23 @@ jobs: - name: Run tests run: | - for d in integrations/* ; do - if [ "$(basename $d)" != "amazon_sagemaker" ]; then - cd $d - hatch run cov - hatch env prune # clean up the environment after docs generation - cd - - fi - done \ No newline at end of file + if [ "${{ runner.os }}" = "Windows" ]; then + Get-ChildItem -Directory "integrations" | ForEach-Object { + if ($_.Name -ne "prova") { + Set-Location $_.FullName + hatch run cov + hatch env prune # clean up the environment after docs generation + Set-Location .. + } + } + else + for d in integrations/* ; do + if [ "$(basename $d)" != "prova" ]; then + cd $d + hatch run cov + hatch env prune # clean up the environment after docs generation + cd - + fi + done + fi + \ No newline at end of file