Skip to content

Commit

Permalink
Merge pull request #3 from mikemaccana/anchor-030
Browse files Browse the repository at this point in the history
Anchor 0.30 and Solana 1.18.5 update
  • Loading branch information
jamesrp13 authored Apr 30, 2024
2 parents 085b05d + e516802 commit 5c28d10
Show file tree
Hide file tree
Showing 11 changed files with 2,881 additions and 1,512 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# From https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs#using-the-nodejs-starter-workflow
name: Node.js CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# See https://github.com/metaDAOproject/setup-anchor for docs
- uses: metadaoproject/[email protected]
with:
anchor-version: "latest"
# Install Solana CLI (beta, required to fix 'ahash' issue)
solana-cli-version: "1.18.5"
node-version: "20.12.2"

# git will keep outputting:
# hint: Using 'master' as the name for the initial branch. This default branch name
# hint: is subject to change.
# Unless we set this.
- name: Set a default branch name for git
run: |
git config --global init.defaultBranch main
- name: Print versions and debugging info
run: |
echo Linux version:
lsb_release -a
echo Solana version:
solana -V
echo Anchor version:
anchor -V
echo build-sbf version:
cargo build-sbf --version
echo Path:
echo $PATH | tr ':' '\n' | sort
# Fixes:
# Error: Unable to read keypair file
# during 'anchor test'
- name: Make a default keypair
run: |
solana-keygen new --no-bip39-passphrase
- name: Test the Movie Review project builds and tests pass
run: |
anchor test 2>&1 | tee -a build.log
cat build.log
cat build.log | grep -qEv 'error|warn'
2 changes: 1 addition & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ url = "https://api.apr.dev"

[provider]
cluster = "localnet"
wallet = "/Users/James/.config/solana/id.json"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
Loading

0 comments on commit 5c28d10

Please sign in to comment.