From 555e6a736c12b730441c8eff9b7b46699b07e3f1 Mon Sep 17 00:00:00 2001 From: l0r1s Date: Mon, 24 Apr 2023 18:23:45 +0300 Subject: [PATCH] chore: merged podman-ci into main zombienet ci to avoid duplicated building, removed dependencies caching --- .github/workflows/ci.yml | 54 +++++++++++++++++++ .github/workflows/podman-ci.yml | 95 --------------------------------- 2 files changed, 54 insertions(+), 95 deletions(-) delete mode 100644 .github/workflows/podman-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f1658475e..900d9e08c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,16 @@ jobs: - run: npm run test working-directory: "./javascript" + - name: Upload build artifacts + if: ${{ matrix.node-version == '18.x' }} + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-build-${{ github.sha }} + path: | + javascript/packages/cli/dist + javascript/packages/orchestrator/dist + javascript/packages/utils/dist + build-rust: runs-on: ubuntu-latest @@ -55,6 +65,50 @@ jobs: - name: Run tests run: cargo test --verbose --all-targets --all-features + run-podman-tests: + runs-on: ubuntu-latest + needs: [build, build-rust] + + strategy: + matrix: + test-path: + - ../tests/smoke/0001-smoke.zndsl + - ../tests/0013-db-snapshot.zndsl + + steps: + - name: Checkout repository + uses: actions/checkout@v3.5.0 + + - name: Setup containers registries + run: | + mkdir -p /etc/containers \ + && echo "unqualified-search-registries = ['docker.io']" \ + && sudo tee /etc/containers/registries.conf + + - name: Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Retrieve build artifacts + uses: actions/download-artifact@master + with: + name: ${{ runner.os }}-build-${{ github.sha }} + path: ./javascript/packages + + - name: Install dependencies + run: npm install --ignore-scripts + working-directory: ./javascript + + - name: Run test + run: npm run zombie -- --provider podman test ${{ matrix.test-path }} + working-directory: ./javascript + env: + DEBUG: zombie* + ZOMBIENET_INTEGRATION_TEST_IMAGE: docker.io/paritypr/polkadot-debug:master + COL_IMAGE: docker.io/paritypr/colander:master + MALUS_IMAGE: docker.io/paritypr/malus:4131-ccd09bbf + all: # This dummy job depends on all the mandatory checks. It succeeds if and only if all CI checks # are successful. diff --git a/.github/workflows/podman-ci.yml b/.github/workflows/podman-ci.yml deleted file mode 100644 index 7cd17c3d5f..0000000000 --- a/.github/workflows/podman-ci.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: ZombieNet Podman CI - - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build-artifacts: - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v3.5.0 - - - name: Setup NodeJS - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ./javascript/**/node_modules - key: npm-${{ hashFiles('./javascript/**/package-lock.json') }} - restore-keys: npm- - - - name: Install dependencies - run: npm install --ignore-scripts - working-directory: ./javascript - - - name: Build project - run: npm run build - working-directory: ./javascript - - - name: Upload build artifacts - uses: actions/upload-artifact@v3 - with: - name: ${{ runner.os }}-build-${{ github.sha }} - path: | - javascript/packages/cli/dist - javascript/packages/orchestrator/dist - javascript/packages/utils/dist - - run-tests: - runs-on: ubuntu-22.04 - needs: build-artifacts - strategy: - matrix: - test-path: - - ../tests/smoke/0001-smoke.zndsl - - ../tests/0013-db-snapshot.zndsl - - steps: - - name: Checkout repository - uses: actions/checkout@v3.5.0 - - - name: Setup containers registries - run: | - mkdir -p /etc/containers \ - && echo "unqualified-search-registries = ['docker.io']" \ - && sudo tee /etc/containers/registries.conf - - - name: Setup NodeJS - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Retrieve build artifacts - uses: actions/download-artifact@master - with: - name: ${{ runner.os }}-build-${{ github.sha }} - path: ./javascript/packages - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ./javascript/**/node_modules - key: npm-${{ hashFiles('./javascript/**/package-lock.json') }} - restore-keys: npm- - - - name: Install dependencies - run: npm install --ignore-scripts - working-directory: ./javascript - - - name: Run test - run: npm run zombie -- --provider podman test ${{ matrix.test-path }} - working-directory: ./javascript - env: - DEBUG: zombie* - ZOMBIENET_INTEGRATION_TEST_IMAGE: docker.io/paritypr/polkadot-debug:master - COL_IMAGE: docker.io/paritypr/colander:master - MALUS_IMAGE: docker.io/paritypr/malus:4131-ccd09bbf \ No newline at end of file