Skip to content

Commit

Permalink
tests: Remove auction-house submodule and host it natively (#2654)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Oct 9, 2023
1 parent 5e7fb44 commit 267c4ce
Show file tree
Hide file tree
Showing 16 changed files with 3,006 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ jobs:
path: tests/ido-pool
# - 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 --frozen-lockfile && anchor test --skip-lint && git checkout Cargo.lock
- cmd: cd tests/auction-house && anchor test --skip-lint
path: tests/auction-house
- cmd: cd tests/floats && yarn --frozen-lockfile && anchor test --skip-lint && npx tsc --noEmit
- cmd: cd tests/floats && anchor test --skip-lint && npx tsc --noEmit
path: tests/floats
- cmd: cd tests/safety-checks && anchor run test
path: tests/safety-checks
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@
path = tests/cfo/deps/stake
url = https://github.com/project-serum/stake.git
branch = armani/cfo
[submodule "tests/auction-house"]
path = tests/auction-house
url = https://github.com/armaniferrante/auction-house
branch = armani/pda
1 change: 0 additions & 1 deletion tests/auction-house
Submodule auction-house deleted from 930215
22 changes: 22 additions & 0 deletions tests/auction-house/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[features]
seeds = true

[programs.localnet]
auction_house = "hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk"

[programs.devnet]
auction_house = "hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk"

[programs.mainnet]
auction_house = "hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk"

[provider]
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

[[test.genesis]]
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
program = "./prebuilt-programs/metaplex_token_metadata.so"
4 changes: 4 additions & 0 deletions tests/auction-house/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[workspace]
members = [
"programs/*"
]
12 changes: 12 additions & 0 deletions tests/auction-house/migrations/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.

const anchor = require("@coral-xyz/anchor");

module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);

// Add your deploy script here.
};
22 changes: 22 additions & 0 deletions tests/auction-house/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "auction-house",
"version": "0.28.0",
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/coral-xyz/anchor#readme",
"bugs": {
"url": "https://github.com/coral-xyz/anchor/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/coral-xyz/anchor.git"
},
"engines": {
"node": ">=17"
},
"scripts": {
"test": "anchor test --skip-lint"
},
"dependencies": {
"@metaplex/js": "^4.4.1"
}
}
Binary file not shown.
24 changes: 24 additions & 0 deletions tests/auction-house/programs/auction-house/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "auction-house"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "lib"]
name = "auction_house"

[features]
no-entrypoint = []
no-idl = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = { path = "../../../../lang" }
anchor-spl = { path = "../../../../spl", features = ["metadata"] }
spl-token = { version = "3.2", features = ["no-entrypoint"] }
spl-associated-token-account = { version = "1.1.1", features = ["no-entrypoint"] }
thiserror = "1.0"
arrayref = "0.3.6"
2 changes: 2 additions & 0 deletions tests/auction-house/programs/auction-house/Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.bpfel-unknown-unknown.dependencies.std]
features = []
Loading

1 comment on commit 267c4ce

@vercel
Copy link

@vercel vercel bot commented on 267c4ce Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-git-master-200ms.vercel.app
www.anchor-lang.com
anchor-docs-200ms.vercel.app
anchor-lang.com

Please sign in to comment.