First make sure the crank turns. Then a leakdown test to see if there are any bad valves or piston rings. Check timing belt, sensors and so on. If the engine runs fine at the junk yard, do a compression test and see where you stand. Also check the underside of the oil cap, white sludge means it went on a lot of short trips. Check the spark plugs for irregular burning patterns. There's probably more but I can't think of anything else right now.
I'd also check some engine rebuilders and see if they have any spare heads or blown motors that they were going to scrap anyway. They're a great place for spare parts for mini-me swaps or LS/Vtec swaps and they could also do some port matching or head milling for you.