diff --git a/.github/workflows/rust_fmt.yml b/.github/workflows/rust_fmt.yml new file mode 100644 index 0000000..2bda69d --- /dev/null +++ b/.github/workflows/rust_fmt.yml @@ -0,0 +1,18 @@ +name: Rustfmt +on: pull_request + +jobs: + format: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - uses: mbrobbel/rustfmt-check@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + mode: review diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..62b4844 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Solana CLI + run: | + sh -c "$(curl -sSfL https://release.solana.com/v1.18.4/install)" + echo 'export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"' >> $HOME/.bashrc + - name: Build + run: | + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + cargo build-bpf + - name: Run tests + run: cargo test --verbose