It depends on what you mean by “mating.” If you simply mean “going through the motions of mating,” it’s not particularly uncommon. Some pokémon will attempt to mate with, quite literally, anything that is also a pokémon.
However, if you mean “produce a viable offspring,” this simply doesn’t happen. Egg groups are actual designations that indicate a pokémon’s genetic compatibility with another pokémon. What that means is that all pokémon within a single egg group are just genetically similar enough to breed. Anything outside of a pokémon’s egg group are too distant in terms of genetic similarities to produce anything at all. It would be like a dog attempting to breed with a cat. There’s technically nothing that would stop one from trying, but nothing would come out of it because the two aren’t compatible enough to produce offspring.