If work is done ON the gas, temperature usually increases, if work is done BY the gas, temperature usually decreases
This question really relates to the ideal gas law PV = nRT
If the pressure increases and volume remains the same or increases, the temperature has to increase to keep that equation balanced.
If the pressure increases and the volume remains the same or decreases, the temperature will decrease.
The other variables P,V, and T will behave similarly. n and R are constants, so you just have to pay attention how an increase in P,V, or T will affect one side of the equation and then determine what has to happen to the other variables to keep everything balanced.