From 45e9d8fe354d2950fc5a56da365bb4a5376bfebd Mon Sep 17 00:00:00 2001 From: andreespirela Date: Fri, 9 Aug 2024 11:41:56 -0400 Subject: [PATCH] CI --- .github/workflows/gcp-docker.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gcp-docker.yml b/.github/workflows/gcp-docker.yml index 6bd7ebe86656..50e96fc51570 100644 --- a/.github/workflows/gcp-docker.yml +++ b/.github/workflows/gcp-docker.yml @@ -61,21 +61,22 @@ jobs: echo "::set-output name=tag::${tag}" echo "Docker tag: ${tag}" + - name: Test Docker + run: |- + docker build . -t wevm:local + mkdir -m 777 .testnet + cd .testnet + git clone https://github.com/weaveVM/wvm-docker-testnet.git . + echo "${{ secrets.GCP_CREDENTIALS_JSON }}" > ./execution/key.json + docker compose up -d + SIGNER_KEY=${{ secrets.TEST_SIGNER_KEY }} node test.js + docker compose down + + - name: Build and Push Container run: |- docker build . -t wevm docker tag wevm us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }} docker tag wevm us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }} docker push "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}" - docker push "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}" - -# - id: docker-push-tagged -# name: Tag Docker image and push to Google Artifact Registry -# uses: docker/build-push-action@v6 -# with: -# context: . -# push: true -# tags: | -# wevm -# us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }} -# us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }} \ No newline at end of file + docker push "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}" \ No newline at end of file