Skip to content

Commit

Permalink
chore: add check if artifact exists
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Aug 8, 2024
1 parent 3e7695d commit b2207a5
Showing 1 changed file with 43 additions and 8 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,47 @@ jobs:
e2e-docker-build-babylon-before-upgrade:
runs-on: ubuntu-22.04
steps:
- name: Artifact babylond-before-upgrade exists
uses: xSAVIKx/artifact-exists-action@v0
id: check-babylond-before-upgrade
with:
name: babylond-before-upgrade

- name: Checkout repository
uses: actions/checkout@v4
- name: Build docker babylond-before-upgrade
- name: Build docker and save babylond-before-upgrade
if: steps.check-babylond-before-upgrade.outputs.exists == 'false'
run: |
make -C contrib/images babylond-before-upgrade
- name: Docker save babylond-before-upgrade
run: |
docker save -o /tmp/docker-babylond-before-upgrade.tar.gz babylonlabs-io/babylond-before-upgrade:latest
- name: Upload babylond-before-upgrade artifact
uses: actions/upload-artifact@v4
with:
name: babylond-before-upgrade
path: /tmp/docker-babylond-before-upgrade.tar.gz

e2e-docker-build-e2e-init-chain:
runs-on: ubuntu-22.04
steps:
- name: Artifact init-chain exists
uses: xSAVIKx/artifact-exists-action@v0
id: check-init-chain
with:
name: init-chain

- name: Checkout repository
uses: actions/checkout@v4
- name: Build docker and save init-chain
if: steps.check-init-chain.outputs.exists == 'false'
run: |
make -C contrib/images init-chain
docker save -o /tmp/docker-init-chain.tar.gz babylonlabs-io/babylond-e2e-init-chain:latest
- name: Upload init-chain artifact
uses: actions/upload-artifact@v4
with:
name: init-chain
path: /tmp/docker-init-chain.tar.gz

e2e-run-ibc-transfer:
needs: [e2e-docker-build-babylon]
runs-on: ubuntu-22.04
Expand All @@ -143,10 +170,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run e2e TestIBCTranferTestSuite
run: |
make test-e2e-cache-ibc-transfer
sudo make test-e2e-cache-ibc-transfer
e2e-run-btc-timestamping:
needs: [e2e-docker-build-babylon, unit-tests]
needs: [e2e-docker-build-babylon]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
Expand All @@ -163,10 +190,10 @@ jobs:
docker load < /tmp/docker-babylond.tar.gz
- name: Run e2e TestBTCTimestampingTestSuite
run: |
make test-e2e-cache-btc-timestamping
sudo make test-e2e-cache-btc-timestamping
e2e-run-upgrade-vanilla:
needs: [e2e-docker-build-babylon, e2e-docker-build-babylon-before-upgrade]
needs: [e2e-docker-build-babylon, e2e-docker-build-babylon-before-upgrade, e2e-docker-build-e2e-init-chain]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
Expand All @@ -181,15 +208,23 @@ jobs:
with:
name: babylond-before-upgrade
path: /tmp
- name: Download init-chain artifact
uses: actions/download-artifact@v4
with:
name: init-chain
path: /tmp
- name: Docker load babylond
run: |
docker load < /tmp/docker-babylond.tar.gz
- name: Docker load babylond-before-upgrade
run: |
docker load < /tmp/docker-babylond-before-upgrade.tar.gz
- name: Docker load init chain
run: |
docker load < /tmp/docker-init-chain.tar.gz
- name: Run e2e TestSoftwareUpgradeTestSuite
run: |
make test-e2e-cache-upgrade-vanilla
sudo make test-e2e-cache-upgrade-vanilla
build-run-integration-tests:
needs: build
Expand Down

0 comments on commit b2207a5

Please sign in to comment.