Dig out the pressure specs for the cartridge. SAAMI "should" have the .22 listed.
Work out the surface area of the case.
Find out the tensile strength of a typical, good quality, mild steel.
Work out what the cross section required would be to reasonably expect it to not blow up, and what you would want as a margin for safety.
Well, if you really want to know....
The whole process is worked out in a book available from Village Press, in the US, called IIRC, Building a Single Shot Falling Block Rifle, by Mueller or Muller. About $17, and it covers all the math stuff for calculating strengths for the barrel and breech block supports for a .225 winchester rifle (the caliber he built, thus the example used).
Street hoods from way back were making illegal personal weapons out of car and radio antenna tubes going way back. Most of them didn't blow up, if what gets read, is to be believed.
Minimum sized barrel, is gonna be really whippy and flexible!
Cheers
Trev