Skip to content

Commit

Permalink
Add CI job for testing every PR
Browse files Browse the repository at this point in the history
  • Loading branch information
sds committed Nov 21, 2024
1 parent 2f33d42 commit 4612fbb
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gitignore
/.git
/.github
/tests
/target
/Dockerfile
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Verify

on:
pull_request:
branches: [main]
workflow_call:
inputs:
malachite_git_ref:
required: true
type: string
default: "8a9f3702eb41199bc8a7f45139adba233a04744a"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/cache/restore@v4
id: malachite-cache
with:
path: malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.malachite_git_ref }}
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
uses: actions/checkout@v4
with:
repository: farcasterxyz/malachite
ref: ${{ inputs.malachite_git_ref }}
path: malachite
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
working-directory: malachite/code
run: cargo build
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
id: malachite-cache
with:
path: malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.malachite_git_ref }}

- uses: actions/checkout@v4
with:
path: snapchain
- working-directory: snapchain
run: cargo build
- working-directory: snapchain
run: cargo test
- working-directory: snapchain
run: cargo fmt --all --check

13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

Prototype for the snapchain proposal

## Development Notes

🚨 **We are not accepting external PRs at this time** 🚨

Presently, due to our current development velocity, we don't have time to review or discuss external PRs. Any PRs opened
against the repo will be closed.

We may accept external PRs at a later date, at which point this note will be removed.

Thank you for your interest in the project!

## Prerequisites

Before you begin, ensure you have the following installed:
Expand All @@ -15,7 +26,7 @@ Before you begin, ensure you have the following installed:
```
git clone [email protected]:informalsystems/malachite.git
cd malachite
git checkout 8a9f3702eb41199bc8a7f45139adba233a04744a
git checkout 8a9f3702eb41199bc8a7f45139adba233a04744a # Remember to update GitHub workflow when changing
cd code && cargo build
```
2. Then clone the snapchain repo and build it:
Expand Down

0 comments on commit 4612fbb

Please sign in to comment.