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 job for testing every PR #73

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
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
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