Two men fired a gun at a taxi as it parked outside a takeaway, police said.
Shots were fired outside Top Taste in Dudley Road, Birmingham, at 16:40 BST on Thursday.
No one was hurt but police condemned the gunmen for their "selfish" actions during the coronavirus pandemic.
Det Insp Kat Sibley said: "Right now we're doing crucial work to protect the NHS and save lives, but we also remain committed to tackling violence in all its forms."
She said detectives were working "round the clock" to find the perpetrators.
"We're determined to find and arrest them as soon as possible, so that we can free up more officers to help in the fight against Covid-19."
Follow BBC West Midlands on Facebook, on Twitter, and sign up for local news updates direct to your phone