Increasing evidence has shown that noncoding RNAs (ncRNAs) can affect drug efficiency by modulating drug sensitivity genes. Exploring the association between ncRNAs and drug sensitivity is essential for drug discovery and disease prevention. However, traditional biological experiments for identifying ncRNA-drug sensitivity associations are time-consuming and laborious. In this study, we develop a novel graph contrastive learning approach named NDSGCL to predict ncRNA-drug sensitivity. NDSGCL uses graph convolutional networks to learn feature representations of ncRNAs and drugs in ncRNA-drug bipartite graphs. It integrates local structural neighbours and global semantic neighbours to learn a more comprehensive representation by contrastive learning. Specifically, the local structural neighbours aim to capture the higher-order relationship in the ncRNA-drug graph, while the global semantic neighbours are defined based on semantic clusters of the graph that can alleviate the impact of data sparsity. The experimental results show that NDSGCL outperforms basic graph convolutional network methods, existing contrastive learning methods, and state-of-the-art prediction methods. Visualization experiments show that the contrastive objectives of local structural neighbours and global semantic neighbours play a significant role in contrastive learning. Case studies on two drugs show that NDSGCL is an effective tool for predicting ncRNA-drug sensitivity associations.