Skip to content

Commit

Permalink
CI worflow improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 16, 2024
1 parent 0fb8b20 commit 2eac681
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,29 @@ jobs:

- name: Check Code
run: cargo check

code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: ./.github/actions/setup

- name: Checkout the source code
uses: actions/checkout@v3

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: "0.21.0"

- name: Upload to codecov.io
uses: codecov/codecov-action@v3.1.0
with:
token: ${{secrets.CODECOV_TOKEN}}

- name: Archive code coverage results
uses: actions/upload-artifact@v3.1.0
with:
name: code-coverage-report
path: cobertura.xml
28 changes: 15 additions & 13 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ name: Smoke tests

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches:
- main
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
smoke:
runs-on: ubuntu-latest


steps:
- name: Checkout Repository
uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: ./.github/actions/setup

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -24,18 +34,10 @@ jobs:
echo "PATH=$GITHUB_WORKSPACE:$PATH" >> $GITHUB_ENV
echo $PATH
- name: Pull Docker Image
run: docker pull szegoo/regionx-node:latest

- name: Create Container
id: create-container
run: |
container_id=$(docker create szegoo/regionx-node:latest)
echo "::set-output name=container_id::$container_id"
- name: Copy Executable from Container
- name: Compile regionx-node
run: |
docker cp ${{ steps.create-container.outputs.container_id }}:/usr/bin/regionx-node .
cargo build --release
cp ./target/release/regionx-node .
- name: Run smoke test 0001
run: ./zombienet-linux-x64 -p native test ./zombienet_tests/0001-smoke-test.zndsl

0 comments on commit 2eac681

Please sign in to comment.