Skip to content

Commit

Permalink
Test GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne committed Dec 6, 2023
1 parent bff37e3 commit 394f919
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/checks-vizro-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ concurrency:
group: checks-ai-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: 3.11

jobs:
checks-vizro-ai:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/checks-vizro-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ concurrency:
group: checks-core-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: 3.11

jobs:
checks-vizro-core:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint-vizro-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
branches: [main]
pull_request:
branches:
- "main"
- main

concurrency:
group: lint-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: 3.11

jobs:
lint-vizro-all:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: 3.11

jobs:
check-version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- cron: "0 4 * * *" # run once a day at 4 AM

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: 3.11

jobs:
secret-scan:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/test-integration-vizro-ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Integration tests for VizroAI

defaults:
run:
working-directory: vizro-ai

on:
push:
branches: [main]
pull_request:
branches:
- main

concurrency:
group: test-integration-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1

jobs:
test-integration-vizro-ai:
name: test-integration-vizro-ai on Py${{ matrix.python-version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.9
hatch-env: all.py3.9
- python-version: 3.10
hatch-env: all.py3.10
- python-version: 3.11
hatch-env: all.py3.11
- python-version: 3.11
hatch-env: lower-bounds
label: lower bounds

steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: Run vizro-ai integration tests with pypi vizro
run: |
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
export OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }}
hatch run ${{ matrix.hatch-env }}:test-integration
- name: Run vizro-ai integration tests with local vizro
run: |
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
export OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }}
cd ../vizro-core
hatch build
cd ../vizro-ai
hatch run ${{ matrix.hatch-env }}:pip install ../vizro-core/dist/vizro*.tar.gz
hatch run ${{ matrix.hatch-env }}:test-integration
57 changes: 57 additions & 0 deletions .github/workflows/test-integration-vizro-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Integration tests for Vizro

defaults:
run:
working-directory: vizro-core

on:
push:
branches: [main]
pull_request:
branches:
- main

concurrency:
group: test-integration-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1

jobs:
test-integration-vizro-core:
name: test-integration-vizro-core on Py${{ matrix.python-version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.8
hatch-env: all.py3.8
- python-version: 3.9
hatch-env: all.py3.9
- python-version: 3.10
hatch-env: all.py3.10
- python-version: 3.11
hatch-env: all.py3.11
- python-version: 3.11
hatch-env: lower-bounds
label: lower bounds

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: List dependencies
run: hatch run ${{ matrix.hatch-env }}:pip freeze

- name: Run integration tests
run: hatch run ${{ matrix.hatch-env }}:test-integration
55 changes: 55 additions & 0 deletions .github/workflows/test-unit-vizro-ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Unit tests for VizroAI

defaults:
run:
working-directory: vizro-ai

on:
push:
branches: [main]
pull_request:
branches:
- main

concurrency:
group: test-unit-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1

jobs:
test-unit-vizro-ai:
name: test-unit-vizro-ai on Py${{ matrix.python-version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.9
hatch-env: all.py3.9
- python-version: 3.10
hatch-env: all.py3.10
- python-version: 3.11
hatch-env: all.py3.11
- python-version: 3.11
hatch-env: lower-bounds
label: lower bounds

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: List dependencies
run: hatch run ${{ matrix.hatch-env }}:pip freeze

- name: Run unit tests
run: hatch run ${{ matrix.hatch-env }}:test-unit-coverage
2 changes: 2 additions & 0 deletions .github/workflows/test-unit-vizro-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
jobs:
test-unit-vizro-core:
name: test-unit-vizro-core on Py${{ matrix.python-version }} ${{ matrix.label }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -37,6 +38,7 @@ jobs:
- python-version: 3.11
hatch-env: lower-bounds
label: lower bounds

steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit 394f919

Please sign in to comment.