Skip to content

move aiplatform install to correct test suite #191

move aiplatform install to correct test suite

move aiplatform install to correct test suite #191

Workflow file for this run

name: AutoMLOps CI Workflow
on:
push:
branches:
- main
- first-integration-test
pull_request:
branches:
- main
merge_group:
branches:
- main
jobs:
lint-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Check for licenses
run: |
./license_check.sh
- name: Lint with pylint
run: |
pylint --jobs=0 $(git ls-files '*.py') --ignore-paths=example --rcfile=.pylintrc
unit-tests:
needs: [lint-checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Run unit tests
run: |
pytest tests/unit --cov=AutoMLOps=
integration-tests:
needs: [lint-checks, unit-tests]
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install google-cloud-aiplatform
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2'
with:
token_format: 'access_token'
workload_identity_provider: '${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}'
service_account: '${{ secrets.INTEGRATION_TEST_SERVICE_ACCOUNT }}'
project_id: '${{ secrets.INTEGRATION_TEST_PROJECT_ID }}'
- name: "Set up Cloud SDK"
uses: 'google-github-actions/setup-gcloud@v2'
with:
project_id: '${{ secrets.INTEGRATION_TEST_PROJECT_ID }}'
install_components: 'beta'
- name: 'Install AMO locally'
run: |
pip install .
# Set the working directory to test/integration to contain the generated files
# TODO move this to a temp directory
- name: Run integration tests
working-directory: tests/integration
env:
PROJECT_ID: ${{ secrets.INTEGRATION_TEST_PROJECT_ID }}
run: |
pytest --cov=AutoMLOps=