Skip to content

debug why github path does not work #15

debug why github path does not work

debug why github path does not work #15

Workflow file for this run

# 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
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
- name: Add Solana bin directory to PATH
run: |
echo "~/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install Rust
# https://stackoverflow.com/questions/57251508/run-rustups-curl-fetched-installer-script-non-interactively
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
# "On a cache miss, the action automatically creates a new cache if the job completes successfully."
# From Rust example at https://github.com/actions/cache/tree/main
- name: Restore Rust dependencies from Cache if possible
uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Anchor
run: |
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install latest
avm use latest
- name: Add Anchor bin directory to PATH
run: |
echo "~/.avm/bin" >> $GITHUB_PATH
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# TODO: clean up PATH hacks after I work out why GITHUB_PATH does not work
- name: Check a blank Anchor project runs without warnings or errors
run: |
echo $PATH
export PATH="~/.avm/bin:$PATH"
export PATH="~/.local/share/solana/install/active_release/bin:$PATH"
anchor init project
cd project
anchor build
anchor test