-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Podman tests #933
[CI] Podman tests #933
Conversation
Looks good! Can we use the |
3798c6b
to
0fb6903
Compare
javascript/packages/orchestrator/src/providers/podman/resources/tempoResource.ts
Show resolved
Hide resolved
javascript/packages/orchestrator/src/providers/podman/resources/prometheusResource.ts
Show resolved
Hide resolved
9a50a7f
to
78dc3f1
Compare
Ping @wirednkod, can you review this one again. I think is good to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @wirednkod, can you review this one again. I think is good to merge. Thanks!
I mean - I see still things that I commented not being altered - I still think that the Provider's tests should run in one CI and not a separate one; In addition I am not for, on caching deps;
There is a repeating of install/build, actions that take place in the existing CI - this will just make things duplicated;
Thanks for the feedback @wirednkod, what do you mean with
We don't have any provider's tests at the moment. We can add test for Thanks! |
I mean we can just do something like this: name: ZombieNet Basic CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 19.x]
steps:
- uses: actions/checkout@v3.5.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
working-directory: "./javascript"
- run: npm run build
working-directory: "./javascript"
- run: npm run lint
working-directory: "./javascript"
- run: npm run test
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
build-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- name: Install Rust Stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo fmt
run: cargo fmt --all -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Build
run: cargo build
- name: Run tests
run: cargo test --verbose --all-targets --all-features
run-podman-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: 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.
needs: [build, build-rust, run-podman-tests]
runs-on: ubuntu-latest
steps:
- run: echo Success There is no reason for podman tetsts to run e.g. if rust build fail, or some other stop of the CI fails.. |
Looks good to me, if you are ok, I can move the podman CI into the main CI and create a custom action for running tests which could be use for future native tests ? It's simplify everything and we avoid duplicate build |
Yes, sounds good to me. Thanks @wirednkod / @l0r1s :) |
…ilding, removed dependencies caching
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only version 18?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is ok to only test on 18
, we don't need to run the same integration test on both 18 and 19.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned in another comment that these lines are actually not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think this is still needed to pin the version of node being used instead of having a lts used and updated when we don't know, no ?
- name: Upload build artifacts | ||
if: ${{ matrix.node-version == '18.x' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why uploading the artifacts at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, we should remove this if we switch to one file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't cache anymore the build and build 2 times ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you? There is a build at the beginning of the CI. Is there going to be a 2nd time? (there should be only one at the beginning with each node version)
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, If I remove this, we can't use node in the job because it's started on a new runner (not a step) and I need to build again additionally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need to retrieve build artifacts since we want to remove also the upload?
No description provided.