Skip to content

Instantly share code, notes, and snippets.

@skulltech
Last active May 7, 2022 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skulltech/6adacd1b1b8a5196795906d89871d964 to your computer and use it in GitHub Desktop.
Save skulltech/6adacd1b1b8a5196795906d89871d964 to your computer and use it in GitHub Desktop.
Solana x Anchor Github Action
name: Build
on:
pull_request:
branches: [master]
types: [opened, reopened, updated, synchronize]
jobs:
format:
name: Format and lint code
runs-on: ubuntu-latest
container: projectserum/build:v0.24.2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Format code
run: cargo fmt --all -- --check
- name: Lint code
run: cargo clippy -- -D warnings --warn clippy::all
run-tests:
name: Run tests
runs-on: ubuntu-latest
container: projectserum/build:v0.24.2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
- name: Install Node dependencies
run: yarn install
- name: Create a new Solana keypair
run: solana-keygen new -s --no-bip39-passphrase
- name: Run tests
run: yarn test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment