Skip to content

Commit

Permalink
Merge pull request #2 from pithfun/chore/add-github-workflow
Browse files Browse the repository at this point in the history
Add tests + rustfmt
  • Loading branch information
jbowa authored Apr 21, 2024
2 parents 826524d + 45ee0e2 commit d1c9151
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/rust_fmt.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d1c9151

Please sign in to comment.