Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Action committed Mar 7, 2024
0 parents commit efde57b
Show file tree
Hide file tree
Showing 360 changed files with 39,172 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
Dockerfile
.dockerignore
.git
.gitignore
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@pepoviola
@l0r1s
124 changes: 124 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: Bug Report
description: File a bug report
labels: ["triage-needed"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
**NOTE** A number of issues reported against Zombienet are often found to already be fixed in more current versions of the project.
Before reporting an issue, please verify the version you are running with `zombienet version` and compare it to the latest release.
If they differ, please update your version of Zombienet to the latest possible and retry your command before creating an issue.
- type: textarea
id: description
attributes:
label: Issue Description
description: Please explain your issue
value: "Describe your issue"
validations:
required: true

- type: textarea
id: reproducer
attributes:
label: Steps to reproduce the issue
description: Please explain the steps to reproduce the issue, including configuration files needed.
value: "Steps to reproduce the issue\n1.\n2.\n3.\n"
validations:
required: true

- type: textarea
id: received_results
attributes:
label: Describe the results you received
description: Please explain the results you are noticing, including stacktrace and error logs.
value: "Describe the results you received"
validations:
required: true

- type: textarea
id: expected_results
attributes:
label: Describe the results you expected
description: Please explain the results you are expecting
value: "Describe the results you expected"
validations:
required: true

- type: input
id: zombienet_version
attributes:
label: Zombienet version
description: Which zombienet version are you using ?
validations:
required: true

- type: dropdown
id: provider
attributes:
label: Provider
description: Which provider are you using ?
options:
- Native
- Kubernetes
- Podman
validations:
required: true

- type: textarea
id: provider_version
attributes:
label: Provider version
description: Which provider version / binaries versions are you using ?
value: |
## For binaries
polkadot 0.9.40-a2b62fb872b
polkadot-parachain 0.9.380-fe24f39507f
## For Kubernetes/Podman
podman version 4.4.1
OR
kubectl version v0.26.3
cluster version 1.25.2
render: yaml
validations:
required: true

- type: dropdown
id: upstream_latest
attributes:
label: Upstream Latest Release
description: Have you tried running the [latest upstream release](https://github.com/paritytech/zombienet/releases/latest)
options:
- 'Yes'
- 'No'
validations:
required: true

- type: textarea
id: additional_environment
attributes:
label: Additional environment details
description: Please describe any additional environment details like (Cloud, Local, OS, Provider versions...)
value: "Additional environment details"

- type: textarea
id: additional_info
attributes:
label: Additional information
description: Please explain the additional information you deem important
value: "Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting"
validations:
required: false

- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Provide us with screenshots if needed to have a better understanding of the issue
validations:
required: false
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Feature request
description: File a feature request
labels: ["triage-needed"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature report!
Please make sure to describe your feature and the problem it would solve.
- type: textarea
id: description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
value: "Describe the feature"
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen..
validations:
required: true

- type: textarea
id: alt_solution
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
id: additional_context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
92 changes: 92 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Cargo Build & Test

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
build:
name: Zombienet SDK - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
# TODO 24-02-08: Disable nightly due to tkaitchuck/aHash#200.
#- nightly
steps:
# https://github.com/jlumbroso/free-disk-space
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false

- uses: actions/checkout@v3

- name: Init nigthly install for fmt
run: rustup update nightly && rustup default nightly && rustup component add rustfmt

- name: Check format
run: cargo +nightly fmt --check --all

- name: Init install
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add clippy

- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "zombie-cache"

- name: Clippy
run: cargo clippy --all-targets --all-features

- name: Build
run: cargo build

- name: Tests
run: cargo test --workspace -- --skip ci_k8s

coverage:
name: Zombienet SDK - coverage
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

permissions:
issues: write
pull-requests: write

steps:
- uses: actions/checkout@v3

# https://github.com/jlumbroso/free-disk-space
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false

- name: Fetch cache
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
shared-key: "zombie-cache"

- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Collect coverage data
run: cargo llvm-cov nextest --lcov --output-path lcov.info

- name: Report code coverage
uses: Nef10/[email protected]
with:
lcov-file: lcov.info
pr-number: ${{ github.event.pull_request.number }}
59 changes: 59 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Cargo Create Docs

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"

jobs:
build-rust-doc:
name: Zombienet SDK - Rust Docs
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
# TODO 24-02-08: Disable nightly due to tkaitchuck/aHash#200.
#- nightly
- stable
steps:
- uses: actions/checkout@v3

- name: Init nigthly install for fmt
run: rustup update nightly && rustup default nightly && rustup component add rustfmt

- name: Check format
run: cargo +nightly fmt --check --all

- name: Init install
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add clippy

- name: Create docs
run: |
cargo doc --no-deps
echo "<meta http-equiv=\"refresh\" content=\"0; url=configuration\">" > target/doc/index.html
- name: Move docs
run: |
mkdir -p ./doc
mv ./target/doc/* ./doc
git config user.email "[email protected]"
git config user.name "GitHub Action"
git config user.password "${{ secrets.GH_PAGES_TOKEN }}"
git checkout --orphan gh-pages
mkdir to_delete
shopt -s extglob
mv !(to_delete) ./to_delete
mv ./to_delete/doc/* .
rm -rf ./to_delete
git add --all
git commit -m "Documentation"
shell: bash # Necessary for `shopt` to work
- run: git push -f origin gh-pages:gh-pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
52 changes: 52 additions & 0 deletions .github/workflows/fileserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: File server build & image publish
run-name: Deploy file server ${{ github.ref }}

on:
push:
branches:
- main
paths:
- "Cargo.toml"
- "crates/file-server/**"
workflow_dispatch: {}

env:
PROJECT_ID: "parity-zombienet"
GCR_REGISTRY: "europe-west3-docker.pkg.dev"
GCR_REPOSITORY: "zombienet-public-images"

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup gcloud CLI
uses: google-github-actions/[email protected]
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ env.PROJECT_ID }}
export_default_credentials: true

- name: Login to GCP
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Artifact registry authentication
run: |
gcloud auth configure-docker ${{ env.GCR_REGISTRY }}
- name: Build, tag, and push image to GCP Artifact registry
id: build-image
env:
IMAGE: "${{ env.GCR_REGISTRY }}/${{ env.PROJECT_ID }}/${{ env.GCR_REPOSITORY }}/zombienet-file-server"

run: |
docker build -t $IMAGE:${{ github.sha }} -f ./crates/file-server/Dockerfile .
docker tag $IMAGE:${{ github.sha }} $IMAGE:latest
docker push --all-tags $IMAGE
echo "image=$IMAGE:${{ github.sha }}" >> $GITHUB_OUTPUT
echo "image=$IMAGE:latest" >> $GITHUB_OUTPUT
Loading

0 comments on commit efde57b

Please sign in to comment.