Skip to content

Merge pull request #106 from metaplex-foundation/ci/fix-deploy-sccript #95

Merge pull request #106 from metaplex-foundation/ci/fix-deploy-sccript

Merge pull request #106 from metaplex-foundation/ci/fix-deploy-sccript #95

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main, develop, 'project/**' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# node: ["16.x", "18.x"]
solana: ["1.10.34"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Solana
uses: ./.github/actions/install-solana
with:
solana_version: ${{ matrix.solana }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run:
npm i @metaplex-foundation/js @metaplex-foundation/amman
- name: Download required files for Amman
run: |
mkdir -p programs
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_auction_house.so > programs/mpl_auction_house.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_candy_guard.so > programs/mpl_candy_guard.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_candy_machine_core.so > programs/mpl_candy_machine_core.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_candy_machine.so > programs/mpl_candy_machine.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_token_metadata.so > programs/mpl_token_metadata.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/solana_gateway_program.so > programs/solana_gateway_program.so
curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/metaplex-foundation/js/contents/programs/mpl_token_auth_rules.so > programs/mpl_token_auth_rules.so
curl -O https://raw.githubusercontent.com/metaplex-foundation/js/main/.ammanrc.js
- name: Start local validator using Amman
run: npx amman start
- name: Run Tests
run: ./gradlew :lib:testDebugUnitTest -PlocalValidator=true