Skip to content

Commit

Permalink
feat: added podman ci to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
l0r1s committed Apr 25, 2023
1 parent c0408da commit ba1bafb
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/podman-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
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

0 comments on commit ba1bafb

Please sign in to comment.