Skip to content

ci: add PR action to build and execute tests #1

ci: add PR action to build and execute tests

ci: add PR action to build and execute tests #1

Workflow file for this run

name: pull_request
on:
push:
pull_request:
branches:
- main
jobs:
complete:
if: always()
needs: [fmt, rust-analyzer-compat, build-and-test]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: cargo fmt --all --check
rust-analyzer-compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: rustup +nightly component add rust-analyzer
- name: Check if rust-analyzer encounters any errors parsing project
run: rustup run nightly rust-analyzer analysis-stats . 2>&1 | (! grep '^\[ERROR')
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: |
rustup update
rustup target add wasm32-unknown-unknown
cargo install --locked --version 20.0.0-rc4 soroban-cli --features opt
make test