This is for the most part supported out of the box in TeamCity if you intend to automatically build all PR branches.
There is a detailed article on this here: http://blog.jetbrains.com/teamcity/2013/02/automatically-building-pull-requests-from-github-with-teamcity/
The key part is that your VCS root branch specification uses the wildcard pattern +:refs/pull/(*/merge)
The "pull" part means all open pull requests qualify as source, the "merge" part means that each pull request is merged with the master branch before running the build config - which is exactly what we want in this case (an alternative is "head" to build the branch in isolation).
We've been running this successfully in our environment. In your scenario you can trigger other build configs (or an automated merge into master) based on the success of the PR test build steps / config.
I recommend installing the plugin mentioned in the article to automatically update the build status in your PRs - helpful.
As a follow-up check out the TeamCity Automatic Merge feature: https://confluence.jetbrains.com/display/TCD9/Automatic+Merge