|
@@ -39,13 +39,14 @@ jobs:
|
|
|
- run: rustup toolchain install nightly --profile minimal --component clippy
|
|
|
- run: cargo +nightly clippy --all-targets -- -D warnings
|
|
|
- run: cargo test
|
|
|
- - run: cd ts && yarn
|
|
|
+ - run: cd ts && yarn --frozen-lockfile
|
|
|
- run: cd ts && yarn test
|
|
|
- run: cd ts && yarn lint
|
|
|
- - run: cd examples/tutorial && yarn
|
|
|
+ - run: cd examples/tutorial && yarn --frozen-lockfile
|
|
|
- run: cd examples/tutorial && yarn lint
|
|
|
- - run: cd tests && yarn
|
|
|
+ - run: cd tests && yarn --frozen-lockfile
|
|
|
- run: cd tests && yarn lint
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
setup-anchor-cli:
|
|
|
name: Setup Anchor cli
|
|
@@ -72,6 +73,8 @@ jobs:
|
|
|
name: anchor-binary
|
|
|
path: ~/.cargo/bin/anchor
|
|
|
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
+
|
|
|
test-examples:
|
|
|
needs: setup-anchor-cli
|
|
|
name: Examples Test
|
|
@@ -118,6 +121,7 @@ jobs:
|
|
|
path: ./examples/tutorial/basic-4/target
|
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-4/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
- run: cd examples/tutorial && yarn workspaces run test
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
setup-client-example:
|
|
|
needs: setup-anchor-cli
|
|
@@ -151,6 +155,7 @@ jobs:
|
|
|
with:
|
|
|
name: ${{ matrix.node.name }}
|
|
|
path: ${{ matrix.node.path }}target/deploy/${{ matrix.node.name }}
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
test-client-example:
|
|
|
needs: setup-client-example
|
|
@@ -190,6 +195,7 @@ jobs:
|
|
|
key: cargo-${{ runner.os }}-client/example-${{ env.ANCHOR_VERSION }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
- uses: ./.github/actions/setup-solana/
|
|
|
- run: cd client/example && ./run-test.sh
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
test-bpf-upgradeable-state:
|
|
|
needs: setup-anchor-cli
|
|
@@ -228,11 +234,12 @@ jobs:
|
|
|
|
|
|
- run: solana-test-validator -r --quiet &
|
|
|
name: start validator
|
|
|
- - run: cd tests/bpf-upgradeable-state && yarn
|
|
|
+ - run: cd tests/bpf-upgradeable-state && yarn --frozen-lockfile
|
|
|
- run: cd tests/bpf-upgradeable-state && yarn link @project-serum/anchor
|
|
|
- run: cd tests/bpf-upgradeable-state && anchor build --skip-lint
|
|
|
- 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
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
test-anchor-init:
|
|
|
needs: setup-anchor-cli
|
|
@@ -263,6 +270,7 @@ jobs:
|
|
|
path: ~/.cargo/bin/
|
|
|
|
|
|
- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && anchor test
|
|
|
+ - uses: ./.github/actions/git-diff/
|
|
|
|
|
|
test-programs:
|
|
|
needs: setup-anchor-cli
|
|
@@ -287,7 +295,7 @@ jobs:
|
|
|
path: tests/interface
|
|
|
- cmd: cd tests/lockup && anchor test --skip-lint
|
|
|
path: tests/lockup
|
|
|
- - cmd: cd tests/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test --skip-lint
|
|
|
+ - cmd: cd tests/swap/deps/serum-dex/dex && cargo build-bpf -- --locked && cd ../../../ && anchor test --skip-lint
|
|
|
path: tests/swap
|
|
|
- cmd: cd tests/escrow && anchor test --skip-lint
|
|
|
path: tests/escrow
|
|
@@ -311,17 +319,17 @@ jobs:
|
|
|
path: tests/chat
|
|
|
- cmd: cd tests/ido-pool && anchor test --skip-lint
|
|
|
path: tests/ido-pool
|
|
|
- - cmd: cd tests/cfo && anchor run test-with-build
|
|
|
+ - cmd: cd tests/cfo && anchor run test-with-build && cd deps/stake && git checkout Cargo.lock && cd ../swap && git checkout Cargo.lock
|
|
|
path: tests/cfo
|
|
|
- - cmd: cd tests/auction-house && yarn && anchor test --skip-lint
|
|
|
+ - cmd: cd tests/auction-house && yarn --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
|
|
|
path: tests/auction-house
|
|
|
- - cmd: cd tests/floats && yarn && anchor test --skip-lint
|
|
|
+ - cmd: cd tests/floats && yarn --frozen-lockfile && anchor test --skip-lint
|
|
|
path: tests/floats
|
|
|
- cmd: cd tests/safety-checks && ./test.sh
|
|
|
path: tests/safety-checks
|
|
|
- cmd: cd tests/custom-coder && anchor test --skip-lint
|
|
|
path: tests/custom-coder
|
|
|
- - cmd: cd tests/validator-clone && yarn && anchor test --skip-lint
|
|
|
+ - cmd: cd tests/validator-clone && yarn --frozen-lockfile && anchor test --skip-lint
|
|
|
path: tests/validator-clone
|
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
@@ -355,3 +363,5 @@ jobs:
|
|
|
|
|
|
- run: ${{ matrix.node.cmd }}
|
|
|
name: ${{ matrix.node.path }} program test
|
|
|
+
|
|
|
+ - uses: ./.github/actions/git-diff/
|