-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge branch 'main' into pop-install
- Loading branch information
Showing
30 changed files
with
538 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Initialize | ||
description: This action initializes a runner for use in other actions. | ||
inputs: | ||
cache-key: | ||
description: "The key to be used for the cache" | ||
git-user: | ||
required: true | ||
description: "The user name to be used for git config" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Ubuntu dependencies | ||
shell: bash | ||
run: sudo apt update && sudo apt install -y protobuf-compiler | ||
|
||
- name: Free up space on runner | ||
shell: bash | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Setup git config | ||
shell: bash | ||
run: | | ||
git config --global user.name ${{ inputs.git-user }} | ||
git config --global user.email ${{ inputs.git-user }}@users.noreply.github.com | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
cache-on-failure: true | ||
cache-all-crates: true | ||
key: ${{ inputs.cache-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,58 +11,68 @@ env: | |
GITHUB_ACTOR: pop-cli | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
|
||
build: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
with: | ||
git-user: ${{ env.GITHUB_ACTOR }} | ||
|
||
- name: Check Feature Contracts Excl. | ||
run: cargo check --no-default-features --features contract | ||
|
||
- name: Check Features Parachain Excl. | ||
run: cargo check --no-default-features --features parachain | ||
|
||
- name: Build default features | ||
run: cargo build | ||
|
||
unit-tests: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
with: | ||
git-user: ${{ env.GITHUB_ACTOR }} | ||
|
||
- name: Run unit tests | ||
run: cargo test --lib | ||
|
||
contract-integration-tests: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
with: | ||
git-user: ${{ env.GITHUB_ACTOR }} | ||
|
||
- name: Run integration tests | ||
run: cargo test --no-default-features --features contract --test contract | ||
|
||
parachain-integration-tests: | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free up space on runner | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
cache-on-failure: true | ||
cache-all-crates: true | ||
|
||
- name: Setup git config | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Install Protoc | ||
uses: arduino/[email protected] | ||
with: | ||
version: "3.6.1" | ||
|
||
- name: Rust Setup | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
override: true | ||
components: rustfmt, clippy, rust-src | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Check Feature Contracts Excl. | ||
run: cargo check --no-default-features --features contract | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Check Features Parachain Excl. | ||
run: cargo check --no-default-features --features parachain | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Build default features | ||
run: cargo build | ||
|
||
- name: Run tests | ||
run: cargo test --all-features | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: "./.github/actions/init" | ||
with: | ||
git-user: ${{ env.GITHUB_ACTOR }} | ||
|
||
- name: Run integration tests | ||
run: cargo test --no-default-features --features parachain --test parachain |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.