stepper motor control using button

  // Initialize the pushbutton pin as an input pullup
  (buttonPin, INPUT_PULLUP);

Something missing there? Seems like you would need to use a function to actually accomplish that.

Your code is trying to read the state of a pin and act on that state. If you can't move the stepper, then there is a distinct possibility that there is a problem with the code that reads the state of the switch and acts upon the information that it got. So, ditch that code. The loop() function should do nothing more than make the stepper step 10 times, then pause for 250 milliseconds.

Why are you not using the Stepper library?