|
| 1 | +# push will run on every pushed commit to any branch (so this will rerun the tests |
| 2 | +# once a branch gets merged to main in addition to any new commits on any branch) |
| 3 | +on: push |
| 4 | + |
| 5 | +name: Automation |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' |
| 9 | + cancel-in-progress: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + post-commit-check: |
| 13 | + name: Post-Commit Validation of Pre-Commit Checks (Includes Linting) |
| 14 | + uses: uc-cdis/.github/.github/workflows/pre_commit.yaml@fix/linting |
| 15 | + with: |
| 16 | + UV_VERSION: '0.10.9' |
| 17 | + JUST_VERSION: '1.46.0' |
| 18 | + secrets: inherit |
| 19 | + |
| 20 | + security: |
| 21 | + name: Security Pipeline |
| 22 | + uses: uc-cdis/.github/.github/workflows/securitypipeline.yaml@master |
| 23 | + with: |
| 24 | + python-poetry: 'true' |
| 25 | + secrets: inherit |
| 26 | + |
| 27 | + unit-test: |
| 28 | + name: Python Unit Test |
| 29 | + # TODO: enable when security and post-commit work reliably |
| 30 | + # needs: [ security, post-commit-check ] |
| 31 | + runs-on: ubuntu-latest |
| 32 | + env: |
| 33 | + UV_VERSION: '0.10.9' |
| 34 | + JUST_VERSION: '1.46.0' |
| 35 | + PYTHON_VERSION: '3.13' |
| 36 | + PGHOST: 'localhost' |
| 37 | + PGPORT: 5432 |
| 38 | + PGUSER: 'postgres' |
| 39 | + |
| 40 | + steps: |
| 41 | + - name: Check out code |
| 42 | + uses: actions/checkout@v6 |
| 43 | + with: |
| 44 | + persist-credentials: false |
| 45 | + |
| 46 | + - name: Set up python |
| 47 | + uses: actions/setup-python@v6 |
| 48 | + with: |
| 49 | + python-version: ${{ env.PYTHON_VERSION }} |
| 50 | + |
| 51 | + - name: python info |
| 52 | + run: python --version |
| 53 | + |
| 54 | + - name: Install uv |
| 55 | + run: | |
| 56 | + curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh |
| 57 | +
|
| 58 | + - uses: taiki-e/install-action@v2 |
| 59 | + with: |
| 60 | + tool: just@${{ env.JUST_VERSION }} |
| 61 | + |
| 62 | + - name: just setup |
| 63 | + run: | |
| 64 | + just setup |
| 65 | +
|
| 66 | + - name: just install |
| 67 | + run: | |
| 68 | + just install |
| 69 | +
|
| 70 | + - name: just test |
| 71 | + run: | |
| 72 | + just test |
| 73 | +
|
| 74 | + image-build-push-1: |
| 75 | + name: Build Image and Push - Gen3 Embeddings |
| 76 | + uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@fix/linting |
| 77 | + needs: [post-commit-check, security, unit-test] |
| 78 | + with: |
| 79 | + BUILD_PLATFORMS: "linux/amd64" |
| 80 | + DOCKERFILE_BUILD_CONTEXT: '.' |
| 81 | + BUILD_ARGS: SERVICE_NAME=gen3_embeddings |
| 82 | + OVERRIDE_REPO_NAME: gen3_embeddings |
| 83 | + secrets: |
| 84 | + ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} |
| 85 | + ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} |
| 86 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 87 | + QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| 88 | + |
| 89 | + image-build-push-2: |
| 90 | + name: Build Image and Push - Gen3 Inference |
| 91 | + uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@fix/linting |
| 92 | + needs: [post-commit-check, security, unit-test] |
| 93 | + with: |
| 94 | + BUILD_PLATFORMS: "linux/amd64" |
| 95 | + DOCKERFILE_BUILD_CONTEXT: '.' |
| 96 | + BUILD_ARGS: SERVICE_NAME=gen3_inference |
| 97 | + OVERRIDE_REPO_NAME: gen3_inference |
| 98 | + secrets: |
| 99 | + ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} |
| 100 | + ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} |
| 101 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 102 | + QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} |
| 103 | + |
| 104 | + image-build-push-3: |
| 105 | + name: Build Image and Push - Gen3 AI Model Repo |
| 106 | + uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@fix/linting |
| 107 | + needs: [post-commit-check, security, unit-test] |
| 108 | + with: |
| 109 | + BUILD_PLATFORMS: "linux/amd64" |
| 110 | + DOCKERFILE_BUILD_CONTEXT: '.' |
| 111 | + BUILD_ARGS: SERVICE_NAME=gen3_ai_model_repo |
| 112 | + OVERRIDE_REPO_NAME: gen3_ai_model_repo |
| 113 | + secrets: |
| 114 | + ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} |
| 115 | + ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} |
| 116 | + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} |
| 117 | + QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} |
0 commit comments