|
| 1 | +name: sdk-jobs-pipelines-stepsequence-pipeline_with_step_sequence_dummy_dependencies |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + schedule: |
| 5 | + - cron: "0 */8 * * *" |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + paths: |
| 10 | + - sdk/python/jobs/pipelines/stepsequence/pipeline_with_step_sequence_dummy_dependencies.ipynb |
| 11 | + - .github/workflows/sdk-jobs-pipelines-stepsequence-pipeline_with_step_sequence_dummy_dependencies.yml |
| 12 | + - "!sdk/python/jobs/pipelines/stepsequence/**/*.md" |
| 13 | + - sdk/python/dev-requirements.txt |
| 14 | + - infra/bootstrapping/** |
| 15 | + - sdk/python/setup.sh |
| 16 | + |
| 17 | +permissions: |
| 18 | + id-token: write |
| 19 | +concurrency: |
| 20 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +jobs: |
| 24 | + build: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - name: check out repo |
| 28 | + uses: actions/checkout@v3 |
| 29 | + - name: setup python |
| 30 | + uses: actions/setup-python@v4 |
| 31 | + with: |
| 32 | + python-version: "3.10" |
| 33 | + - name: pip install notebook reqs |
| 34 | + run: pip install -r sdk/python/dev-requirements.txt |
| 35 | + - name: azure login |
| 36 | + uses: azure/login@v1 |
| 37 | + with: |
| 38 | + client-id: ${{ secrets.OIDC_AZURE_CLIENT_ID }} |
| 39 | + tenant-id: ${{ secrets.OIDC_AZURE_TENANT_ID }} |
| 40 | + subscription-id: ${{ secrets.OIDC_AZURE_SUBSCRIPTION_ID }} |
| 41 | + - name: bootstrap resources |
| 42 | + run: | |
| 43 | + echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'; |
| 44 | + bash bootstrap.sh |
| 45 | + working-directory: infra/bootstrapping |
| 46 | + continue-on-error: false |
| 47 | + - name: setup SDK |
| 48 | + run: | |
| 49 | + source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh"; |
| 50 | + source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh"; |
| 51 | + bash setup.sh |
| 52 | + working-directory: sdk/python |
| 53 | + continue-on-error: true |
| 54 | + - name: setup-cli |
| 55 | + run: | |
| 56 | + source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh"; |
| 57 | + source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh"; |
| 58 | + bash setup.sh |
| 59 | + working-directory: cli |
| 60 | + continue-on-error: true |
| 61 | + - name: Eagerly cache access tokens for required scopes |
| 62 | + run: | |
| 63 | + # Workaround for azure-cli's lack of support for ID token refresh |
| 64 | + # Taken from: https://github.com/Azure/login/issues/372#issuecomment-2056289617 |
| 65 | +
|
| 66 | + # Management |
| 67 | + az account get-access-token --scope https://management.azure.com/.default --output none |
| 68 | + # ML |
| 69 | + az account get-access-token --scope https://ml.azure.com/.default --output none |
| 70 | + - name: install ml extension |
| 71 | + run: az extension add -n ml -y |
| 72 | + - name: run jobs/pipelines/stepsequence/pipeline_with_step_sequence_dummy_dependencies.ipynb |
| 73 | + run: | |
| 74 | + source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh"; |
| 75 | + source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh"; |
| 76 | + bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json"; |
| 77 | + bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" replace_template_values "pipeline_with_step_sequence_dummy_dependencies.ipynb"; |
| 78 | + [ -f "../../.azureml/config" ] && cat "../../.azureml/config"; |
| 79 | + papermill -k python pipeline_with_step_sequence_dummy_dependencies.ipynb pipeline_with_step_sequence_dummy_dependencies.output.ipynb |
| 80 | + working-directory: sdk/python/jobs/pipelines/stepsequence |
| 81 | + - name: upload notebook's working folder as an artifact |
| 82 | + if: ${{ always() }} |
| 83 | + uses: ./.github/actions/upload-artifact |
| 84 | + with: |
| 85 | + name: stepsequence |
| 86 | + path: sdk/python/jobs/pipelines/stepsequence |
0 commit comments