Skip to content

Commit

Permalink
ci: add anchor init template test (coral-xyz#1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-schaaf authored and NBNARADHYA committed Mar 9, 2022
1 parent 1d19f84 commit 0600564
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tests.yaml
Expand Up @@ -234,6 +234,36 @@ jobs:
- run: cd tests/bpf-upgradeable-state && solana program deploy --program-id program_with_different_programdata.json target/deploy/bpf_upgradeable_state.so
- run: cd tests/bpf-upgradeable-state && cp bpf_upgradeable_state-keypair.json target/deploy/bpf_upgradeable_state-keypair.json && anchor deploy && anchor test --skip-deploy --skip-build --skip-lint

test-anchor-init:
needs: setup-anchor-cli
name: Test Anchor Init
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/

- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-anchor
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./target/
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/download-artifact@v2
with:
name: anchor-binary
path: ~/.cargo/bin/

- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && anchor test

test-programs:
needs: setup-anchor-cli
name: Test ${{ matrix.node.path }}
Expand Down

0 comments on commit 0600564

Please sign in to comment.