From 22cbc879a7143858d93eac6528f045e3c24bb5b8 Mon Sep 17 00:00:00 2001 From: makarychev <3645723+makarychev@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:04:12 +0300 Subject: [PATCH] add ci --- .github/workflows/test.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e42c5cf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +on: [push] + +jobs: + Test: + runs-on: [ubuntu-22.04] + env: + RUST_VERSION: 1.78.0 + SOLANA_VERSION: 1.18.17 + ANCHOR_VERSION: 0.30.1 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + override: true + components: rustfmt, clippy + + - name: Install Solana + uses: metadaoproject/setup-solana@v1.0 + with: + solana-cli-version: ${{ env.SOLANA_VERSION }} + + - name: Generate Key + run: solana-keygen new --no-passphrase + + - name: Install Anchor + run: cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_VERSION }} anchor-cli --locked + + - name: Build Programs + run: anchor build + + - name: Install Dependencies + run: yarn install + + - name: JS Tests + run: anchor test \ No newline at end of file