  We introduce partial formality and relate resonance with partial formality
properties. For instance, we show that for finitely generated nilpotent groups
that are k-formal, the resonance varieties are trivial up to degree k. We also
show that the cohomology ring of a nilpotent k-formal group is generated in
degree 1, up to degree k+1; this criterion is necessary and sufficient for
2-step nilpotent groups to be k-formal. We compute resonance varieties for
Heisenberg-type groups and deduce the degree of partial formality for this
class of groups.
