From 3d45eb943e01946ff61844aa2b92d41a219b529f Mon Sep 17 00:00:00 2001 From: sferatime Date: Fri, 8 Nov 2024 15:55:54 +0800 Subject: [PATCH] Use setup-build-action and setup-python --- .github/workflows/pipeline.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 5c5129b53..89b809f93 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -67,16 +67,17 @@ jobs: runs-on: ["self-hosted", "k8s-prod"] needs: - build-image - container: - image: docker:dind steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - uses: actions/setup-python@v5 - uses: actions/checkout@v4 with: fetch-depth: 0 + - run: pip install -r ./.github/workflows/requirements.txt - name: Run tests run: | - apk add python3 py3-pip && python3 -m venv /venv && . /venv/bin/activate && pip3 install -r ./.github/workflows/requirements.txt && \ - /venv/bin/python3 ./.github/workflows/deploy.py run_tests \ + python3 ./.github/workflows/deploy.py run_tests \ --evm_sha_tag=${{ needs.build-image.outputs.evm_sha_tag }} \ --neon_test_tag=${{ needs.build-image.outputs.neon_test_tag }} \ --run_number=${{ github.run_number }} \ @@ -88,16 +89,17 @@ jobs: runs-on: ["self-hosted", "k8s-prod"] needs: - build-image - container: - image: docker:dind steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - uses: actions/setup-python@v5 - uses: actions/checkout@v4 with: fetch-depth: 0 + - run: pip install -r ./.github/workflows/requirements.txt - name: Trigger proxy build run: | - apk add python3 py3-pip && python3 -m venv /venv && . /venv/bin/activate && pip3 install -r ./.github/workflows/requirements.txt && \ - /venv/bin/python3 ./.github/workflows/deploy.py trigger_proxy_action \ + python3 ./.github/workflows/deploy.py trigger_proxy_action \ --evm_pr_version_branch=${{ needs.build-image.outputs.evm_pr_version_branch }} \ --is_evm_release=${{ needs.build-image.outputs.is_evm_release }} \ --evm_sha_tag=${{ needs.build-image.outputs.evm_sha_tag }} \ @@ -111,27 +113,28 @@ jobs: uses: "andymckay/cancel-action@0.4" finalize-image: runs-on: ["self-hosted", "k8s-prod"] - container: - image: docker:dind needs: - build-image - trigger-proxy-tests - run-evm-tests steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - uses: actions/setup-python@v5 - uses: actions/checkout@v4 with: fetch-depth: 0 + - run: pip install -r ./.github/workflows/requirements.txt - name: Finalize image run: | - apk add python3 py3-pip && python3 -m venv /venv && . /venv/bin/activate && pip3 install -r ./.github/workflows/requirements.txt && \ - /venv/bin/python3 ./.github/workflows/deploy.py finalize_image \ + python3 ./.github/workflows/deploy.py finalize_image \ --evm_sha_tag=${{ needs.build-image.outputs.evm_sha_tag }} \ --evm_tag=${{ needs.build-image.outputs.evm_tag }} - name: Send notification to slack if: failure() run: | - /venv/bin/python3 ./.github/workflows/deploy.py send_notification \ + python3 ./.github/workflows/deploy.py send_notification \ --evm_tag=${{ needs.build-image.outputs.evm_tag }} \ --url=${{secrets.SLACK_EVM_CHANNEL_URL}} \ --build_url=${BUILD_URL}