From 5d23a33b0b7cd1b9a854f38ce14809df877c61fc Mon Sep 17 00:00:00 2001 From: Shane da Silva Date: Thu, 21 Nov 2024 14:58:37 -0800 Subject: [PATCH] Add CI job for testing every PR (#73) --- .dockerignore | 1 + .github/workflows/verify.yml | 52 ++++++++++++++++++++++++++++++++++++ README.md | 13 ++++++++- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/verify.yml diff --git a/.dockerignore b/.dockerignore index 8ecdc1e..255f4cc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .gitignore /.git +/.github /tests /target /Dockerfile diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..c5bbde2 --- /dev/null +++ b/.github/workflows/verify.yml @@ -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 + diff --git a/README.md b/README.md index 8298a4a..ce43c7f 100644 --- a/README.md +++ b/README.md @@ -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: @@ -15,7 +26,7 @@ Before you begin, ensure you have the following installed: ``` git clone git@github.com: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: