Skip to content

Add SDK tests to native asset library #750

Add SDK tests to native asset library

Add SDK tests to native asset library #750

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
RUST_VERSION: 1.75.0
FORC_VERSION: 0.53.0
CORE_VERSION: 0.23.0
jobs:
build-sway-lib:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Check Sway formatting
run: forc fmt --path libs --check
- name: Check Rust formatting
run: cargo fmt --manifest-path tests/Cargo.toml --verbose --check
- name: Build All Libs
run: forc build --path libs
- name: Build All Tests
run: forc build --path tests
- name: Cargo Test sway-lib
run: |
cargo test --manifest-path tests/Cargo.toml
forc-inline-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Run Libs Tests
run: forc build --path libs && forc test --path libs
- name: Run Tests Tests
run: forc build --path tests && forc test --path tests
contributing-book:
runs-on: ubuntu-latest
strategy:
matrix:
project: ["docs/contributing-book/src/code"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Check Sway formatting
run: forc fmt --path ${{ matrix.project }} --check
- name: Build Sway
run: forc build --path ${{ matrix.project }}
build-forc-doc-sway-libs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/action-fuel-toolchain@v0.6.0
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Build sway-libs docs
run: |
forc doc --manifest-path libs