Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Enable anchor init test #2529

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,34 +332,33 @@ jobs:
# - run: cd tests/misc && chmod +x ci.sh && ./ci.sh
# - run: cd tests/misc && anchor test --skip-lint

# TODO: Re-enable after releasing `0.28.0`. See https://github.com/coral-xyz/anchor/pull/2512
# test-anchor-init:
# needs: setup-anchor-cli
# name: Test Anchor Init
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup/
# - uses: ./.github/actions/setup-ts/
# - uses: ./.github/actions/setup-solana/
test-anchor-init:
needs: setup-anchor-cli
name: Test Anchor Init
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/

# - uses: actions/cache@v3
# if: ${{ env.CACHE != 'false' }}
# name: Cache Cargo registry + index
# id: cache-anchor
# with:
# path: ${{ env.CARGO_CACHE_PATH }}
# key: cargo-${{ runner.os }}-${{ env.CARGO_PROFILE }}-anchor-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
name: Cache Cargo registry + index
id: cache-anchor
with:
path: ${{ env.CARGO_CACHE_PATH }}
key: cargo-${{ runner.os }}-${{ env.CARGO_PROFILE }}-anchor-${{ hashFiles('**/Cargo.lock') }}

# - uses: actions/download-artifact@v3
# with:
# name: ${{ env.ANCHOR_BINARY_NAME }}
# path: ~/.cargo/bin/
# - run: chmod +x ~/.cargo/bin/anchor
- uses: actions/download-artifact@v3
with:
name: ${{ env.ANCHOR_BINARY_NAME }}
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

# - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
# - uses: ./.github/actions/git-diff/
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/

test-programs:
needs: setup-anchor-cli
Expand Down