Skip to content

Commit

Permalink
ci: add PR action to build and execute tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Oct 17, 2023
1 parent 1a50d3f commit d67d10b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: pull_request

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

complete:
if: always()
needs: [fmt, 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

build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: rustup target add wasm32-unknown-unknown
- run: cargo install --locked --version 20.0.0-rc4 soroban-cli --features opt
- run: make test

0 comments on commit d67d10b

Please sign in to comment.