diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ab9ceba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: + push: + branches: + - main + - pg/update-xcm + tags: + - v* + paths-ignore: + - 'README.md' + pull_request: + branches: + - main + paths: + - '.github/workflows/ci.yml' + +jobs: + check: + name: Build & Test + strategy: + matrix: + platform: + - ubuntu_20_64_core + toolchain: + - stable + job: + - test + steps: + + - name: Checkout sources & submodules + uses: actions/checkout@v3 + with: + fetch-depth: 1 + submodules: recursive + + - name: Install toolchain + id: toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + components: rust-src + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v2.2.0 + + - name: Install `cargo-contract` `main` + uses: actions-rs/cargo@v1 + with: + command: install + args: --git https://github.com/paritytech/cargo-contract.git + + - name: Install cargo-dylint + uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0 + with: + crate: cargo-dylint + version: 1 + + - name: Install dylint-link + uses: baptiste0928/cargo-install@bf6758885262d0e6f61089a9d8c8790d3ac3368f # v1.3.0 + with: + crate: dylint-link + version: 1 + + - name: Output versions + run: | + cargo -vV + cargo contract --version + + - name: Run Test + run: | + cargo test