TRN-808 Sylo Data Pallet #2107
Workflow file for this run
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
name: CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- release/* | |
- main | |
paths: | |
- "**.rs" | |
- "**.toml" | |
- "**.lock" | |
- "chain-specs/**" | |
- ".github/workflows/*.yml" | |
- "**.ts" | |
jobs: | |
format-build-test: | |
runs-on: [seed-builder] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
components: rustfmt | |
- name: Format | |
run: | | |
cargo -V | |
cargo fmt --all -- --check | |
- name: Check | |
run: | | |
cargo -V | |
cargo check --release --all --all-features | |
- name: Test | |
run: | | |
cargo -V | |
cargo test --all --all-features | |
#- name: Benchmark (build only) | |
# run: cargo check --features=runtime-benchmarks | |
e2e: | |
runs-on: [seed-builder] | |
defaults: | |
run: | |
working-directory: ./e2e | |
steps: | |
- name: Cleanup # https://github.com/actions/checkout/issues/211#issuecomment-1300522915 | |
uses: AutoModality/action-clean@v1 | |
- name: "Check out the repo" | |
uses: "actions/checkout@v3" | |
- name: "Install Node.js" | |
uses: "actions/setup-node@v3" | |
with: | |
node-version: "20.9.0" | |
# cache: "yarn" | |
- name: "Install yarn globally" | |
run: "npm install -g yarn" | |
- name: "Install the dependencies" | |
run: "yarn install --immutable --prefer-offline" | |
- name: "Format the code" | |
run: "yarn format" | |
- name: "Lint the code" | |
run: "yarn lint" | |
- name: "Create docker image" | |
run: "docker build -t seed/pr -f Dockerfile ." | |
working-directory: ./ | |
- name: "Compile the contracts and generate the TypeChain bindings" | |
run: "yarn hardhat compile" | |
- name: "Test the contracts" | |
run: "yarn test:parallel" | |
- name: "Clean up docker images" | |
run: "yes | docker image prune" | |
# - name: "Test the contracts and generate the coverage report" | |
# run: "yarn coverage" | |
# - name: "Add test summary" | |
# run: | | |
# echo "## Test results" >> $GITHUB_STEP_SUMMARY | |