Updated

Slumping lefty J.A. Happ can close out a rare sweep for the game set at Minute Maid Park.

The Astros won Tuesday's game, 8-2, to put themselves in line for just their second sweep of the season after winning three in a row from the Chicago Cubs at Wrigley Field to bridge May and June.

Houston hasn't swept a set at home since exactly a year ago, when it took three in a row from St. Louis from Aug. 30-Sept. 1.

On Tuesday, J.D. Martinez had three hits and drove in three runs in the middle game to continue his incredible August, and the Astros scored six times in the sixth inning.

Martinez has 28 RBI this month, the most by any rookie in Astros history in a single month.

Jose Altuve added two RBI in support of Henry Sosa (2-2), who threw six strong innings. Sosa gave up just two hits and fanned seven batters to win back-to- back starts.

Carlos Lee and Jimmy Paredes each tallied a pair of hits and an RBI for Houston, which has won three in a row.

Charlie Morton (9-8) surrendered six hits and four runs over 5 1/3 innings. He also had eight strikeouts against four walks and has just one victory in his last eight outings.

Andrew McCutchen hit a solo homer off Brett Myers in the ninth inning, but the Pirates suffered their fifth loss in six games.

Happ, a 28-year-old from Illinois, has gone 1-7 in his last 10 starts and is winless since July 19, when he defeated Washington, 7-6, after allowing five runs on seven hits in 5 2/3 innings. He's gone no longer than six innings in four subsequent losing starts, however.

In 19 2/3 innings in those games, he's allowed 19 runs on 28 hits.

A 12-game winner with Philadelphia in 2009, Happ has won just nine times in 36 outings since joining the Astros in a deal that sent Roy Oswalt to the Phillies in 2010.

He's 2-2 against the Pirates in six career outings.

Pittsburgh starts 26-year-old righty James McDonald, who won his eighth game of the season on Aug. 15, but has gotten no-decisions in two starts since.

The former Los Angeles Dodgers draft choice has surrendered eight hits and six runs in 12 innings against Cincinnati and at St. Louis since beating the Cardinals, 6-2, for his last victory.

He's faced Houston four times in 90 big-league appearances and is 1-0 with a 4.60 earned run average across 15 2/3 innings.

The Pirates are 6-4 in his last 10 starts.

Pittsburgh came into this series having won nine of 12 over Houston.