Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #9

Open
wants to merge 1 commit into
base: pg/update-xcm
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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