North Korea test-fires a ballistic missile from a region north of its capital, but it appears to have failed, South Korea’s military says, defying intense pressure from the United States and the reclusive state’s main ally, China.