Preheat the oven to 200°C/gas mark 6. Put the onion, tomatoes, chickpeas and garlic cloves in a large roasting tray and season with black pepper. Make sure the cut sides of the tomatoes are all facing upwards. Drizzle over the olive oil and bake in the oven for 15 minutes.
Meanwhile, make the chermoula. Put all of the ingredients in a mini food processor and blitz until paste like.
Remove the vegetables from the oven and nestle the cod fillets on top. Squeeze the lemon juice over the fish. Return to the oven for another 15 minutes, or until the fillets are cooked through. Remove from the oven and top each fillet with some of the chermoula.