chore(deps): bump @solana/web3.js from 1.90.0 to 1.90.2 #172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
env: | |
cli-id: anchor-v0.29.0.solana-1.18.0.v1 | |
SWAP_PROGRAM_OWNER_FEE_ADDRESS: HfoTxFR1Tm6kGmWgYWD6J7YHVy1UwqSULUGVLXkJqaKN | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.13.0' | |
- name: ⚡️ Cache | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
key: $${{ env.cli-id }} | |
path: | | |
~/.local/share/solana | |
~/.cargo | |
~/.rustup | |
/opt/hostedtoolcache/node | |
target | |
node_modules | |
- name: Setup Rust | |
id: install-rust-toolchain | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Setup Clippy | |
id: install-clippy | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: rustup component add clippy | |
- name: Install OS Deps | |
id: install-os-deps | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev | |
- name: Install Solana Tools | |
id: install-solana-tools | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: sh -c "$(curl -sSfL https://release.solana.com/v1.18.0/install)" | |
- name: Install Anchor CLI | |
id: install-anchor-cli | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: cargo install --git https://github.com/project-serum/anchor --tag v0.29.0 anchor-cli --locked | |
- name: Add Solana Tools to Path | |
run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV | |
- name: Install Node Deps | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
npm install -g typescript | |
corepack enable | |
yarn set version 3.6.0 | |
npm install -g ts-mocha | |
npm install -g @coral-xyz/anchor | |
yarn install | |
- name: Build Programs | |
run: anchor build | |
- name: Run Clippy | |
run: cargo clippy -- -D warnings --A clippy::too_many_arguments --A clippy::borrowed-box --A clippy::result_large_err | |
lint: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: ⚡️ Cache | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
key: $${{ env.cli-id }} | |
path: | | |
~/.local/share/solana | |
~/.cargo | |
~/.rustup | |
/opt/hostedtoolcache/node | |
target | |
node_modules | |
- run: yarn install | |
- run: cargo fmt -- --check | |
- run: yarn run prettier --c ./ | |
test-unit: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: ⚡️ Cache | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
key: $${{ env.cli-id }} | |
path: | | |
~/.local/share/solana | |
~/.cargo | |
~/.rustup | |
/opt/hostedtoolcache/node | |
target | |
node_modules | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.13.0' | |
- run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV | |
- name: unit test | |
run: cargo test | |
program-integration-tests: | |
needs: [ build, lint, test-unit ] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
test: | |
[ | |
{ | |
scope: "tests/integration-tests/batch1/*.ts", | |
}, | |
{ | |
scope: "tests/integration-tests/batch2/*.ts", | |
}, | |
{ | |
scope: "tests/integration-tests/batch3/*.ts", | |
}, | |
{ | |
scope: "tests/integration-tests/batch4/*.ts", | |
}, | |
] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: ⚡️ Cache | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
key: $${{ env.cli-id }} | |
path: | | |
~/.local/share/solana | |
~/.cargo | |
~/.rustup | |
/opt/hostedtoolcache/node | |
target | |
node_modules | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.13.0' | |
- run: | | |
corepack enable | |
yarn set version 3.6.0 | |
yarn install | |
- run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV | |
- name: Create Test Wallet | |
run: solana-keygen new --no-bip39-passphrase | |
- name: Run Test | |
run: anchor test ${{ matrix.test.scope }} | |
# audit: | |
# runs-on: ubuntu-latest | |
# needs: [build] | |
# steps: | |
# - name: Check-out the repository | |
# uses: actions/checkout@v2 | |
# - name: ⚡️ Cache | |
# id: cache-deps | |
# uses: actions/cache@v2 | |
# with: | |
# key: $${{ env.cli-id }} | |
# path: | | |
# ~/.local/share/solana | |
# ~/.cargo | |
# ~/.rustup | |
# /opt/hostedtoolcache/node | |
# target | |
# node_modules | |
# - uses: actions/setup-node@v2 | |
# with: | |
# node-version: '16.13.0' | |
# - run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV | |
# - name: Soteria Audit | |
# continue-on-error: false | |
# uses: silas-x/soteria-action@main | |
# with: | |
# solana-version: "1.18.0" | |
# run-mode: "-analyzeAll" | |
# cargo-com: "." | |
# program-path: "programs/drip" | |
# deploy: | |
# if: github.ref == 'refs/heads/main' | |
# needs: [ test-integration-batch-1, test-integration-batch-2, test-integration-batch-3, test-integration-batch-4 ] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# with: | |
# submodules: 'true' | |
# fetch-depth: 0 | |
# - name: Setup Node | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '16.13.0' | |
# - name: ⚡️ Cache | |
# id: cache-deps | |
# uses: actions/cache@v2 | |
# with: | |
# key: $${{ env.cli-id }} | |
# path: | | |
# ~/.local/share/solana | |
# ~/.cargo | |
# ~/.rustup | |
# /opt/hostedtoolcache/node | |
# target | |
# node_modules | |
# - name: Add Solana Tools to Path | |
# run: echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV | |
# - name: Deploy Devnet Staging Program | |
# run: ./scripts/deploy-devnet-staging.sh | |
# env: | |
# UPGRADE_AUTHORITY: ${{ secrets.UPGRADE_AUTHORITY }} | |
# DRIP_KEYPAIR: ${{ secrets.DRIP_KEYPAIR }} |