Skip to content

Commit

Permalink
enable ci
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Feb 13, 2024
1 parent 4ccbffa commit 3314414
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2,299 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: test

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
test:
name: Anchor Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get solana version
id: solana
run: |
SOLANA_VERSION="$(awk '/solana_version =/ { print substr($3, 2, length($3)-2) }' Anchor.toml)"
echo "::set-output name=version::${SOLANA_VERSION}"
- name: Get anchor version
id: anchor
run: |
ANCHOR_VERSION="$(awk '/anchor_version =/ { print substr($3, 2, length($3)-2) }' Anchor.toml)"
echo "::set-output name=version::${ANCHOR_VERSION}"
- uses: metadaoproject/anchor-test@c47c46486d1a62b0b22419163d7f7bfae570c390
with:
anchor-version: "${{steps.anchor.outputs.version}}"
solana-cli-version: "${{steps.solana.outputs.version}}"

- run: cargo fmt --check --all
- run: cargo clippy
2 changes: 2 additions & 0 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[toolchain]
anchor_version = "0.29.0"
solana_version = "1.18.1"

[features]
seeds = false
Expand Down
Loading

0 comments on commit 3314414

Please sign in to comment.