I'm looking for a non-constant function $f(x)$, which there is a irrational number $\alpha$ such that $$ f(x)=f(x+1)=f(x+\alpha) $$ for all $x\in\mathbb{R}$.
Note that though the function $f(x)$ do not have a smallest period, but that doesn't mean $f(x)$ must be a constant (the Dirichlet function is a good example, but it failed in this situation).
Fix $\alpha$ irrational. How about : $$ f(x) = \begin{cases} 0 & \exists r,s \in \mathbb Q , x = r+s\alpha \\ 1 & \mathrm{otherwise} \end{cases} $$
Then, if $f(x)=0$, $x = r+s\alpha$, so $x+\alpha = r+(s+1)\alpha$ and $x+1 = (r+1) + s\alpha$ ,so $f(x+1) = f(x+\alpha) = 0$.
If $f(x) =1$ then $x$ is not a rational plus a rational multiple of $\alpha$ , then $x+1$ and $x+\alpha$ also cannot be. Thus this function works.
We can see that $f$ doesn't have a smallest period , however. This is because if $f$ is a function such that $f(x) = f(x+1) = f(x+\alpha)$ for some $\alpha$ irrational, then we can easily write $f(x) = f(x +r +s\alpha)$ for any $r,s$ rational, and one can easily show that $\inf\{|r+s \alpha| : r,s \in \mathbb Q\} = 0$.
From the theory of functional equations, all we need to define such an $f$ is that $f$ be defined on one element of every equivalence class of the relation on $\mathbb R$ given by $x \sim y$ if and only if $x-y = r+s\alpha$ for some $r,s$ rational. Since there are many such equivalence classes, one may easily define $f$ individually on each class and get a multitude of functions which work out.