-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af036cd
commit a6a5010
Showing
10 changed files
with
540 additions
and
631 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,81 @@ | ||
name: Build and Test | ||
name: 'Build and Test' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: 'true' | ||
RUSTC_WRAPPER: 'sccache' | ||
|
||
jobs: | ||
build_and_test_rust: | ||
name: Build and Test Rust | ||
name: 'Build and test Rust' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run sccache-cache | ||
- name: 'Run sccache-cache' | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Build Cargo crates | ||
- name: 'Build Cargo crates' | ||
run: cargo build --release | ||
|
||
- name: Test Cargo crates | ||
- name: 'Test Cargo crates' | ||
run: cargo test --all-features | ||
|
||
- name: Build Cargo docs | ||
- name: 'Build Cargo docs' | ||
run: cargo doc --no-deps | ||
|
||
- name: Lint Rust | ||
- name: 'Lint Rust' | ||
run: cargo clippy --all-targets --all-features | ||
|
||
- name: Check Rust formatting | ||
- name: 'Check Rust formatting' | ||
run: cargo fmt --all -- --check | ||
|
||
build_and_test_js: | ||
name: Build and Test JavaScript | ||
name: 'Build and test JavaScript' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: 'Setup PNPM' | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- uses: ./.github/actions/setup-dfx | ||
- name: 'Setup DFX' | ||
uses: dfinity/setup-dfx@main | ||
with: | ||
dfx-version: 'auto' | ||
|
||
- name: Run sccache-cache | ||
- name: 'Run sccache-cache' | ||
uses: mozilla-actions/[email protected] | ||
|
||
# Triggers installation of the Rust toolchain | ||
# Must be done before wasm-pack is installed | ||
- name: Cargo metadata | ||
- name: 'Cargo metadata' | ||
run: cargo metadata --format-version 1 | ||
|
||
- name: Install wasm-pack | ||
- name: 'Setup wasm-pack' | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Generate canister declarations | ||
- name: 'Generate canister declarations' | ||
run: dfx generate | ||
|
||
- name: Build NPM packages | ||
- name: 'Build NPM packages' | ||
run: pnpm build | ||
|
||
- name: Build canisters | ||
- name: 'Build canisters' | ||
run: dfx build --check | ||
|
||
- name: Test NPM packages | ||
- name: 'Test NPM packages' | ||
run: pnpm test | ||
|
||
- name: Wasm test | ||
- name: 'Wasm test' | ||
run: wasm-pack test --node packages/ic-response-verification --features=js | ||
|
||
- name: Check Typescript formatting | ||
- name: 'Check Typescript formatting' | ||
run: pnpm run format:check |
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 |
---|---|---|
@@ -1,29 +1,28 @@ | ||
name: Check commit messages | ||
name: 'Check commit messages' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check_commit_messages: | ||
name: Check Commit Messages | ||
name: 'Check commit messages' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: 'Setup Python' | ||
uses: dfinity/ci-tools/actions/setup-python@main | ||
|
||
- name: 'Setup Commitizen' | ||
uses: dfinity/ci-tools/actions/setup-commitizen@main | ||
|
||
- name: Install Commitzen | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U Commitizen | ||
- name: 'Check commit messages' | ||
uses: dfinity/ci-tools/actions/check-commit-messages@main | ||
with: | ||
starting_commit: 'ac8f90b7c45e13e240d6c01a43d191b99f1aec4a' | ||
|
||
- name: Check Commit Messages | ||
run: cz check --rev-range ac8f90b7c45e13e240d6c01a43d191b99f1aec4a..HEAD | ||
- name: 'Check pull request title' | ||
uses: dfinity/ci-tools/actions/check-pr-title@main |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Create Release PR | ||
name: 'Create Release PR' | ||
|
||
on: workflow_dispatch | ||
|
||
|
@@ -8,47 +8,49 @@ env: | |
|
||
jobs: | ||
bump_version: | ||
name: Bump version | ||
name: 'Bump version' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: 'Setup PNPM' | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- uses: ./.github/actions/setup-dfx | ||
- name: 'Setup DFX' | ||
uses: dfinity/setup-dfx@main | ||
|
||
- name: Install wasm-pack | ||
- name: 'Setup wasm-pack' | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Run sccache-cache | ||
- name: 'Run sccache-cache' | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Bump Version | ||
- name: 'Bump Version' | ||
id: cz | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
commit: false | ||
push: false | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Print Version | ||
- name: 'Print Version' | ||
run: echo "Bumping to version ${{ steps.cz.outputs.version }}" | ||
|
||
- name: DFX prepare Certified Counter | ||
- name: 'DFX prepare Certified Counter' | ||
working-directory: examples/certification/certified-counter | ||
run: | | ||
dfx canister create --all | ||
dfx generate backend | ||
- name: Update Cargo.lock | ||
- name: 'Update Cargo.lock' | ||
run: | | ||
cargo build | ||
pnpm build | ||
- name: Create Pull Request | ||
- name: 'Create Pull Request' | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
title: 'Release ${{ steps.cz.outputs.version }}' | ||
|
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 |
---|---|---|
@@ -1,38 +1,37 @@ | ||
name: e2e Tests | ||
name: 'e2e Tests' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: 'true' | ||
RUSTC_WRAPPER: 'sccache' | ||
|
||
jobs: | ||
e2e_tests: | ||
name: e2e Tests | ||
name: 'e2e tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/setup-pnpm | ||
- name: 'Setup PNPM' | ||
uses: dfinity/ci-tools/actions/setup-pnpm@main | ||
|
||
- name: Run sccache-cache | ||
- name: 'Run sccache-cache' | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Setup e2e Deps Cache | ||
- name: 'Setup e2e Deps Cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: tmp/ | ||
key: ${{ runner.os }}-tmp | ||
|
||
- name: Install wasm-pack | ||
- name: 'Setup wasm-pack' | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: e2e tests | ||
- name: 'e2e tests' | ||
run: ./scripts/e2e.sh --use-latest-dfx |
Oops, something went wrong.